6

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?

Lernkurve
  • 20,203
  • 28
  • 86
  • 118
Jesvin Jose
  • 22,498
  • 32
  • 109
  • 202

1 Answers1

7

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)

Jayendra
  • 52,349
  • 4
  • 80
  • 90