Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Support Hierarchical Facets #1076

Closed
otisg opened this Issue · 67 comments

52 participants

Otis Gospodnetic richardsyeo Jeremy Carroll Mike Karolow Raul Martinez Jr mrgautamsam Lev Gorodinski Chris. tfreitas Leonardo Gamas Nicolas Huray Vineeth Mohan gjb83 Guilherme Pereira Jérémie BORDIER Gary Qiu hbrunsting Jurica Zeleznjak Jack Chen Rauan Maemirov Bhagwat Kumar himanshuseth Mikael Andersson Paul Woestelandt and others
Otis Gospodnetic

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)
Otis Gospodnetic

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

Raul Martinez Jr

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

mrgautamsam

+1 Looking forward to this feature!!

Lev Gorodinski

+1

Chris.

+1

tfreitas

+1

Nicolas Huray

+1

gjb83

+1

Jérémie BORDIER

+1

tfreitas

+1

Jurica Zeleznjak

+1

Jack Chen

+1

Bhagwat Kumar

+1

Mikael Andersson

+1

Deleted user

+1

Jurgen Goelen

+1

Özgür Orhan

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

Keith Webster

+1

Ivan Brusic

Otis,

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

Stephan

+1

fbpj

+1

Stephan

+1

Wes

+1

Raul Martinez Jr

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

Cedric Hurst

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.

Łukasz Rżanek

+1 and many more

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

Miha Vrhovnik

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

Cedric Hurst

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.

Shay Banon
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.

Otis Gospodnetic

@kimchy Does it rely on DocValues at the core?

Shay Banon
Owner

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

Otis Gospodnetic

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

Matt Weber

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.

Shay Banon
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

Matt Weber

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

Amir Raminfar

+1 This would help out a lot.

Cedric Hurst

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.

Amir Raminfar

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!

Otis Gospodnetic 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.