This seems to be a popular request. This feature would allow hierarchical facets on fields that are not necessarily numeric, thus allowing faceting that looks like this, for example:
Media Type Facets:
Maybe this newly committed Lucene faceting module will provide the Hierarchical Faceting, so ES doesn't have to reinvent its own variant?
See also: https://issues.apache.org/jira/browse/SOLR-2412
+1 on this. I really need this feature for my project.
+1 Looking forward to this feature!!
the general case may be difficult to solve, but maybe a little more functionality will go a long way.
my use case:
a corpus of author/post pairs, i'm interested in counts of specific terms, over time, binned by users.
i'm currently using individual query for each member, with date_histogram.
that's O(index*users) over the index, and it only needs to be O(index)
Most of those Lucene/Solr jiras are old. How effective are hierarchical facets in Solr? Still, a big +1 from me.
+1, last time I looked at the Hierarchical Faceting ticket of Lucene, it is still open. Anyway, this one feature is going to be a killer feature of Lucene and ES.
In the meantime, there is one possible solution for hierarchical facets:
I haven't tried it personally, but on the surface I would imagine this approach would work.
+1 and many more
Is someone working on this or is there any progress, even conceptual, to report?
Hm the cited Lucene ticket seems to have been merged into Lucene 4.0.
So having this in 1.0 would be nice.
+1 please please please
On the Boston Elasticsearch Meetup/Google Hangout last week, I believe the ES team mentioned that this was slated tentatively for the 1.0 release. If I'm wrong, someone please correct me. Can't seem to find the recording.
We spent time designing a new facets infrastructure, that will support this feature inherently. It is currently planned for the 1.0 release, though I must admit it is very ambitious. It is highly important and we will make all the effort to make sure it makes it to 1.0.
@kimchy Does it rely on DocValues at the core?
@otisg thats nto really relevant to if facets are hierarchical or not...
True, true. Would it be true to say that in 1.0 there be heavy use of DocValues, including for faceting?
Lucene facets support hierarchical faceting oob but the tricky part is getting them to be distributed and the fact they would need to be defined in the mapping since they build a data-structure separate from the main index on disk. It would be neat to expose this functionality.
@otisg In general, yes, we hope to expose doc values, and then things will work just the same, regardless if they use doc values, or do the uninverting from terms into memory.
@mattweber we have other ideas on how to implement composable facets that will enable the range of functionality we are after (a bit different compared to the current lucene faceting implementation).
I'm very intersting by this functionnality +1
+1 I would like a term stats facets with a date histogram for each term
For all the +1ers, please see #3300.
+1 This would help out a lot.
According to @uboness this feature should be covered in the new aggregation pipeline, slated for release in ES 1.0. See the city/state "Aggregating Hierarchical Data" example at the bottom of the #3300 description.
Yep, I saw it. I have downloaded beta version yet. We are in middle of a launch but I am excited to give it a try!