Ways to do hierarchial faceting in Solr?

南笙酒味 提交于 2019-11-27 04:46:41

问题


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?


回答1:


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)



来源:https://stackoverflow.com/questions/8504477/ways-to-do-hierarchial-faceting-in-solr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!