Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ways to do hierarchial faceting in Solr?

If a doc is listed as Book>Fiction>Sci-FI, it must be searchable when your facet query is "Book", "Book>Fiction", "Book>Fiction>Sci-fi".


I searched the Internet and the methods I came up with are:

1 Split the "Book>Fiction>Sci-FI" into "Book", "Book>Fiction", "Book>Fiction>Sci-fi" at index-time itself and store them in same field.

2 Have separate fields cat, sub_cat, sub_sub_cat. Split the catogories into corresponding fields and use Pivot facets http://wiki.apache.org/solr/SimpleFacetParameters#Pivot_.28ie_Decision_Tree.29_Faceting


What are other ways to do hierarchial facets, so that they can support any complex queries?

like image 393
Jesvin Jose Avatar asked Dec 14 '11 12:12

Jesvin Jose


People also ask

How do Facets work in SOLR?

Faceted search is the dynamic clustering of items or search results into categories that let users drill into search results (or even skip searching entirely) by any value in any field. Each facet displayed also shows the number of hits within the search that match that category.

What is facet pivot in SOLR?

SOLR-6329) Pivot Faceting (whether distributed or not) only supports faceting on field values (SOLR-6353) Distributed Pivot Faceting may not work well with some custom FieldTypes. ( SOLR-6330) Using facet.* parameters as local params inside of facet.field causes problems in distributed search. (


1 Answers

Check http://wiki.apache.org/solr/HierarchicalFaceting

Its mentioned the options mentioned by you and some more.

Pivot facets is the solution for hierarchy faceting if you can use Solr 4.0

If you have issues upgrading, you can check the option @ http://www.lucidimagination.com/why-lucid/webinars/mastering-power-faceted-search (similar to option 1 of yours)

like image 63
Jayendra Avatar answered Oct 17 '22 00:10

Jayendra