Several months ago, during one of the projects I have tried to construct a query with optimal faceting. The problem was that we need filters (fq) in the query but in the same time we need a faceting that was not filtered. To some point it was not possible in Solr – you had to make two queries. But now, you can do it with one query. Let’s meet LocalParams.
During my everyday work, I have seen many repeated queries, to Solr, with only one filter difference. When I asked why – I got anserws that it was necessary to get the faceting results for various filters. If you are using Solr version 1.4 or later, my suggestion is to use local params – what is it and how to use – this post will attempt to answer both questions.
Faceting is one of the ways to categorize the content found in the process of information retrieval. In case of Solr this is the division of set of documents on the basis of certain criteria: content of individual fields, queries or on the basis of compartments or dates. In today’s entry I will try to some scope on the possibility of using the faceting mechanism, both currently available in Solr 1.4.1, as well as what will be available in the future.