Chapter 1, Your First Application, introduced the Hibernate Search DSL, which is the most straightforward approach for writing search queries. When using the DSL, method calls are chained together in such a way that the series resembles a programming language in its own right. If you have worked with criteria queries in Hibernate ORM, then this style will appear very familiar.
Whether you are using the traditional
FullTextSession object or the JPA-style
FullTextEntityManager object, each passes a Lucene query that was generated by the
QueryBuilder class. This class is the starting point for the Hibernate Search DSL, and it offers several Lucene query types.
The most basic form of search, which we have glimpsed ...