Query Syntax and Parsers

A query parser converts a user’s search terms into a Lucene query to find appropriately matching documents.

Solr supports several query parsers, offering search application designers great flexibility in controlling how queries are parsed.

This section explains how to specify a query parser and describes the syntax and features supported by several parsers available in Solr.

There are some query parameters common to all Solr parsers; these are discussed in the section Common Query Parameters.

Query parsers are also called QParserPlugins. They are all subclasses of QParserPlugin. If you have custom parsing needs, you may want to extend that class to create your own query parser.

Common Query Parameters: Query parameters that can be used with all query parsers.

Standard Query Parser: The standard Lucene query parser.

DisMax Query Parser: The DisMax query parser.

Extended DisMax (eDisMax) Query Parser: The Extended DisMax (eDisMax) Query Parser.

Function Queries: Parameters for generating relevancy scores using values from one or more numeric fields.

Local Params: How to add local arguments to queries.

JSON Request API: Solr’s JSON Request API.

Searching Nested Child Documents: Constructing nested and hierarchical queries.

Block Join Query Parser: Query parser dedicated to searching nested documents.

Join Query Parser: Query parser to facilitate joins.

Spatial Search: Solr’s spatial search capabilities.

Dense Vector Search: Solr’s dense retrieval capabilities.

Other Query Parsers: More parsers designed for use in specific situations.

SQL Query Language: SQL language support for Solr.

Query Screen: Form-based query builder.

SQL Query Screen: SQL query runner with tabular results.