Chapter 7. Writing a Lucene query

This chapter covers
  • Parsing and the QueryParser syntax
  • The QueryParser and user-friendly query entry
  • Tokenization and analyzers
  • Lucene’s base Query classes

You’ve purchased something online. Maybe it’s a book or clothing from a department store with an online presence. Your order is a week overdue, so you go back to the website to check its status, but you’ve misplaced the order number. You call the contact number and are told, “I’m sorry, I can only look up your order if you can give me your Order ID.” Oh-oh, does this sound familiar?

These all-or-nothing database-style searches are quickly being overtaken by the search techniques we discuss in this book. These much more flexible methods can query for a document ...

Get Hibernate Search in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.