Understanding and using the Lucene query language
As you know, Solr is built using the Apache Lucene library. Due to this, some of the query parsers available in Solr allow us to fully leverage the query language of Lucene, giving us great flexibility to understand how our queries work and with what documents they match. In this recipe, we will discuss an example usage of the Lucene query language by looking at a book search site that gives its users the possibility of defining complex Boolean queries that contain phrases.
How to do it...
Let's perform the following steps to achieve this:
- The first step is to prepare our index to handle data. To do this, we add the following entries to the
<field name="id" type="string" indexed="true" ...