Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Support Hierarchical Facets #1076

Closed
otisg opened this Issue · 66 comments
@otisg

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

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

@juneym

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

@mrgautamsam

+1 Looking forward to this feature!!

@eulerfx

+1

@acerb

+1

@tfreitas

+1

@nhuray

+1

@gjb83

+1

@ahfeel

+1

@tfreitas

+1

@jzelez

+1

@chendo

+1

@bhagwat

+1

@gbgmian

+1

@ghost

+1

@jgoelen

+1

@frail

+1

@nabloom

+1

@y-p

+1

@y-p
y-p commented

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

+1

@brusic

Otis,

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

@ssalat

+1

@fbpj

+1

@ssalat

+1

@wesplunk

+1

@juneym

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

@divideby0

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

+1 and many more

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

@mvrhov

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

@mungiud

hope so

@elja

+1 please please please

@divideby0

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.

@kimchy
Owner

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

@kimchy Does it rely on DocValues at the core?

@kimchy
Owner

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

@otisg

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

@mattweber

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.

@kimchy
Owner

@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

I'm very intersting by this functionnality +1

@jbwl

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

@mattweber

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

@amir20

+1 This would help out a lot.

@divideby0

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

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 otisg closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.