I have been looking around to find the best approach to solving how I can drill down a hierarchical structure using facets in sunspot/solr.
Here is the problem:
I have an active record model that is indexed.
Within that model I have multiple "tags" that can be associated to.
These tags are really routes within a navigational structure e.g. shopping/photos , and as such are hierarchical. They can go four levels deep at this point.
I would like to be able to use facets to "drill-down" this structure. e.g. only shopping/*.
One solution I came across is to flatten the structure e.g. in the document, de-normalize the hierarchy so you define the each level as a separate field, to me this appears clunky. But i guess will solve the problem, is there a better way?