Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
306 views
in Technique[技术] by (71.8m points)

faceted search - 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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

56.9k users

...