Web / Apache Solr Interview questions
What is the purpose of a query parser in Solr?
A query parser converts the raw text passed in the q parameter into a structured Lucene Query object that can actually be executed against the index.
Solr ships with several:
- Standard (Lucene) parser - supports Lucene's own syntax: field:value, boolean operators, ranges.
- DisMax - simplified syntax for user-typed queries across multiple fields.
- eDisMax - extended DisMax with more Lucene-like syntax support.
The parser is selected with the defType parameter, and choosing the right one directly affects both relevance ranking and how forgiving Solr is of user input like unescaped special characters.
More Related questions...