On Mar 8, 2007, at 10:52 PM, Chris Hostetter wrote:
or something like...
<level1>Dir1</level1>
<level2>Subdir1</level2>
<level3>SubSubDir1</level3>
...but this is why Hierarchical facets are hard.
I've not yet tackled hierarchical facets myself despite the demand
being there. It seems there are various ways this could be
implemented, and ironing out the pros/cons of each is necessary.
Using the suggestion above is just like having normal facets, yet the
user interface takes care of making things seem hierarchical. Once
Dir1 becomes a constraint only its level2 subdirs would be returned.
Using a single field to represent hierarchy also would work by using
PrefixQuery's:
<dir>Dir1/Subdir1/SubSubDir1</dir>
Again, the UI would need to display this appropriately, and allow a
user to select levels in the hierarchy and send to Solr "dir:Dir1/*"
and so on.
Certainly Solr can, and likely eventually will, implement some type
of built-in support for hierarchical facets, we can still hack them
in with what we've got I believe.
I like what I see with Flamenco and hierarchical facets: <http://
orange.sims.berkeley.edu/cgi-bin/flamenco.cgi/nobel/Flamenco> - in
this example, Affiliation and Year have levels below them that appear
after the broader selection is made (or you can hover and see the
tool-tip popup too).
Erik