O'Reilly logo

Apache Solr 3 Enterprise Search Server by Eric Pugh, David Smiley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Query syntax (the lucene query parser)

Solr's native / full query syntax is implemented by the query parser named lucene. It is based on Lucene's old syntax with a few additions that will be pointed out explicitly. In fact, you've already seen the first addition which is local-params.

Tip

The best practice for the user query (the q parameter) is to use the dismax or edismax query parsers, not the default lucene query parser described here. dismax only supports a basic essential subset of the full syntax that is unlikely to cause unintended behavior by a general user, whereas edismax supports the syntax here but is safer and has many bonus features. You'll read more about these query parsers in the next section.

The lucene query parser does have a ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required