# Solarium examples

In this folder you can find various examples for the Solarium PHP Solr client library, to be used on a Solr 'example' index as distributed with Solr.
Only the code is included, for more details about the examples and how to get them working please see the manual on the project website: http://www.solarium-project.org

If examples for some Solarium functionality are missing please request them by opening an issue in the issue tracker: http://github.com/basdenooijer/solarium/issues

Important: This code is intended to demonstrate the usage of Solarium. It is not intended for real-world use. For instance user input validation is missing or very limited, as the best way to do this will depend on your application and is not Solarium functionality.
It's advised not to deploy the examples to a public environment, or at least make sure the example directory is not available via your webserver.

- 1. Basic usage

- 1.1 Check solarium availability and ping Solr
- 1.2 Basic select
- 1.3 Basic update - add document

- 2. Queries

- 2.1. Select query

- 2.1.1 Select query params
- 2.1.2 Custom result document
- 2.1.3 Filterquery
- 2.1.4 Components

- 2.1.5.1 FacetSet

- 2.1.5.1.1 Facet field
- 2.1.5.1.2 Facet query
- 2.1.5.1.3 Facet multiquery
- 2.1.5.1.4 Facet range
- 2.1.5.1.5 Facet pivot
- 2.1.5.1.6 Facet interval

- 2.1.5.2 MoreLikeThis
- 2.1.5.3 Highlighting

- 2.1.5.3.1 Per-field highlighting options

- 2.1.5.4 Dismax
- 2.1.5.5 Edismax
- 2.1.5.6 Grouping by field
- 2.1.5.7 Grouping by query
- 2.1.5.8 Distributed search (sharding)
- 2.1.5.9 Spellcheck
- 2.1.5.10 Stats
- 2.1.5.11 Debug (DebugQuery)

- 2.1.6 Helper functions
- 2.1.7 Query re-use

- 2.2. Update query

- 2.2.1 Add docs
- 2.2.2 Delete by query
- 2.2.3 Delete by ID
- 2.2.4 Optimize index
- 2.2.5 Rollback

- 2.3. MoreLikeThis query

- 2.3.1 MoreLikeThis query
- 2.3.2 MoreLikeThis query input as stream

- 2.4. Analysis queries

- 2.4.1 Analysis query for a document
- 2.4.2 Analysis query for a field

- 2.5 Terms query
- 2.6 Suggester query
- 2.7 Extract query
- 2.8 Realtime get query

- 4. Usage modes

- 4.1 API
- 4.2 Configuration
- 4.3 Extending

- 5. Customization

- 5.1 Partial usage
- 5.2 Extending
- 5.3 Plugin system

- 5.3.1 Event hooks
- 5.3.2 Modifying Solarium presets

- 6. Miscellaneous

- 6.1 Client adapters

- 6.1.1 Zend_Http adapter
- 6.1.2 Pecl_Http adapter
- 6.1.3 Curl adapter
- 6.1.4 Http adapter (PHP stream)

- 6.2 Escaping
- 6.3 Placeholder syntax
- 6.4 Dereferenced params

- 7. Plugins

- 7.1 Loadbalancer
- 7.2 Post Big Requests
- 7.3 Customize Requests
- 7.4 Parallel Execution
- 7.5 Buffered Add for documents
- 7.6 Prefetch iterator for select queries
- 7.7 Minimum score filter for select queries

- 7.7.1 Minimum score filter for select queries using grouping