Lucene Snippets: Faceting Search
The latest snippet from my Lucene examples demonstrates how to achieve a facet search using the Lucene 4.0 API and how easy it is to define multiple category paths to aggregate search results for different possible facets. In the following example we’re indexing some books as a classical example and create multiple category paths for author, publication date and category afterwards .. Lucene Dependencies We simply need two dependencies here .. lucene-core of course and in addition the lucene-facet library .. I’ve added the declarations needed for Maven and SBT here .. if you’re using Gradle or Buildr you should’t have a problem to transfer the information needed ;) ...