Support Hierarchical Facets #1076

Closed
otisg opened this Issue Jun 29, 2011 · 66 comments

Comments

Projects
None yet

otisg commented Jun 29, 2011

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:

  • twitter (20)
    • source: foo (12)
    • source: bar (8)
  • facebook (14)
    • source: foo (10)
    • source: bar (4)

otisg commented Jul 3, 2011

Maybe this newly committed Lucene faceting module will provide the Hierarchical Faceting, so ES doesn't have to reinvent its own variant?
https://issues.apache.org/jira/browse/LUCENE-3079

See also: https://issues.apache.org/jira/browse/SOLR-2412

+1

juneym commented Aug 17, 2011

+1 on this. I really need this feature for my project.

+1 Looking forward to this feature!!

eulerfx commented Oct 20, 2011

+1

Contributor

acerb commented Nov 3, 2011

+1

tfreitas commented Nov 4, 2011

+1

+1

Contributor

nhuray commented Dec 29, 2011

+1

+1

gjb83 commented Jan 4, 2012

+1

Contributor

ahfeel commented Jan 16, 2012

+1

tfreitas commented Feb 7, 2012

+1

jzelez commented Apr 12, 2012

+1

chendo commented May 21, 2012

+1

bhagwat commented Jun 8, 2012

+1

gbgmian commented Jun 8, 2012

+1

@ghost

ghost commented Jun 18, 2012

+1

jgoelen commented Jul 2, 2012

+1

frail commented Jul 2, 2012

+1

arimlib commented Jul 5, 2012

+1

y-p commented Jul 31, 2012

+1

y-p commented Aug 1, 2012

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)

ciatog commented Aug 23, 2012

+1

Contributor

brusic commented Sep 19, 2012

Otis,

Most of those Lucene/Solr jiras are old. How effective are hierarchical facets in Solr? Still, a big +1 from me.

ssalat commented Oct 16, 2012

+1

fbpj commented Nov 19, 2012

+1

+1

+1

ssalat commented Jan 17, 2013

+1

+1

+1

wesplunk commented Feb 5, 2013

+1

+1

juneym commented Feb 11, 2013

+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:

http://www.springyweb.com/2012/01/hierarchical-faceting-with-elastic.html

I haven't tried it personally, but on the surface I would imagine this approach would work.

uded commented Feb 13, 2013

+1 and many more

Is someone working on this or is there any progress, even conceptual, to report?

mvrhov commented Mar 14, 2013

Hm the cited Lucene ticket seems to have been merged into Lucene 4.0.
So having this in 1.0 would be nice.

mungiud commented Apr 13, 2013

hope so

+1

elja commented May 7, 2013

+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.

Owner

kimchy commented May 7, 2013

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.

otisg commented May 8, 2013

@kimchy Does it rely on DocValues at the core?

Owner

kimchy commented May 8, 2013

@otisg thats nto really relevant to if facets are hierarchical or not...

otisg commented May 8, 2013

True, true. Would it be true to say that in 1.0 there be heavy use of DocValues, including for faceting?

Contributor

mattweber commented May 8, 2013

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.

Owner

kimchy commented May 8, 2013

@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).

rturpin commented Jun 17, 2013

I'm very intersting by this functionnality +1

jbwl commented Aug 4, 2013

+1 I would like a term stats facets with a date histogram for each term

Contributor

mattweber commented Aug 4, 2013

For all the +1ers, please see #3300.

amir20 commented Dec 8, 2013

+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.

amir20 commented Dec 9, 2013

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!

otisg closed this Dec 27, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment