Query flow
From Solariumwiki
(Redirected from Query flow)
Each query that is executed using the Solarium client follows a similar flow. This is best explained by a diagram:
Short description of the steps:
- You create a query object that describes the query you want to execute and call your client instance
- The client passes this query to it's configured adapter
- The adapter uses a request class to 'translate' a query object into a HTTP request (this step is optional, see the note below)
- The adapter executes the HTTP request on the configured Solr server
- Solr response data is forwarded to a response class. This class parses the Solr (json) data.
- A result object is created by the response parser
- The result object is returned to the adapter
- The adapter returns the result object as the query result
- Finally this result is returned to the caller.
The next pages will discuss the flow components in detail.
Note: The Request (flow) and Response (flow) parts are optional, depending on the adapter. The currently available adapters use the request and response classes, but the planned PHP Solr extension adapter won't use them.
