On Mon, 23 Jan 2012 14:33:00 -0800 (PST), Yuhao <nfsvi...@yahoo.com> wrote: > Programmatically, something like this might work: for each facet field, > add another hidden field that identifies its parent. Then, program > additional logic in the UI to show only the facet terms at the currently > selected level. For example, if one filters on "cat:electronics", the new > UI logic would apply the additional filter "cat_parent:electronics". Can > this be done?
Yes. This is how I do it. > Would it be a lot of work? No. Its not a lot of work, simply represent your hierarchy as parent/child relations in the document fields and in your UI drill down by issuing new faceted searches. Use the current facet (tree level) as the parent:<level> in the next query. Its much easier than other suggestions for this. > Is there a better way? Not in my opinion, there isn't. This is the simplest to implement and understand. > > By the way, Flamenco (another faceted browser) has built-in support for > hierarchies, and it has worked well for my data in this aspect (but less > well than Solr in others). I'm looking for the same kind of hierarchical > UI feature in Solr.