Web / Apache Solr Interview questions
Explain the execution flow of a Solr search request?
A single /select request passes through a defined pipeline of components before a response is returned.
- The SearchHandler receives the request and reads its configured component chain.
- The active query parser (standard, DisMax, eDisMax) converts
qinto a LuceneQuery. - The QueryComponent executes the search against the index (or all shards, if distributed) and collects matching doc IDs.
- Additional components - facets, highlighting, "more like this" - run if requested, each adding data to the response.
- A response writer (JSON by default) serializes everything into the final HTTP response.
Because this is a configurable chain, custom search components can be inserted at any point, which is how features like spell-check suggestions get added to a query without touching core search logic.
More Related questions...