O'Reilly logo

Hibernate Search in Action by John Griffin, Emmanuel Bernard

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

Chapter 8. Filters: cross-cutting restrictions

This chapter covers
  • Configuring and using dynamic filters
  • Caching filters
  • Various filter examples

Full-text queries are great for answering a question formulated by a user. However, in some situations, you’ll need to add restrictions that don’t belong to the core of the user question. These are cross-cutting restrictions: restrict by security, restrict by category, restrict by availability, and so on. This is what a filter is for.

What is a filter? A filter restricts results of a query after the Lucene query has been executed, usually based on rules that aren’t directly related to the query. Filters can be adjusted independently of the original query and don’t affect the relative score of a document ...

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