Ask a Question
Advertise on boostr.in
Organizational Research By
Surprising Reserch Topic
Question:how to use Faceted Search in solr?
Faceted search takes the documents matched by a query and generates counts for various properties or categories. Links are usually provided that allows users to "drill down" or refine their search results based on the returned categories.
The following example searches for all documents (*:*) and requests counts by the category field cat.
Notice that although only the first 10 documents are returned in the results list, the facet counts generated are for the complete set of documents that match the query.
We can facet multiple ways at the same time. The following example adds a facet on the boolean inStock field:
Solr can also generate counts for arbitrary queries. The following example queries for ipod and shows prices below and above 100 by using range queries on the price field.
...&q=ipod&facet=true&facet.query=price:[0 TO 100]&facet.query=price:[100 TO *]
Solr can even facet by numeric ranges (including dates). This example requests counts for the manufacture date (manufacturedate_dt field) for each year between 2004 and 2010.
More information on faceted search may be found on the faceting overview and faceting parameters pages.
Sep 13, 2013
Sep 12, 2013
to add a comment.
Related Hot Questions
Your name to display (optional):
Email me at this address if my answer is selected or commented on:
Email me if my answer is selected or commented on
Privacy: Your email address will only be used for sending these notifications.
To avoid this verification in future, please