Skip to content

Loading…

Support "size": 0 for Term Facet #1776

Closed
ctrochalakis opened this Issue · 31 comments
@ctrochalakis

Is it possible to add support for setting "size": 0 to simple Term Facets in order to return all terms matching the hits?

This should be similar to the TermsStats Facet api.

@kimchy
elastic member

Yes, its definitely possible. I plan to do some refactoring in this area, once its done, we can then add this.

@ctrochalakis

Great, keep up the good work :)

@pointlessjon

Excellent.

Just wanted to give a big thumb up (two, even!) to this idea.

also, when implemented this might also close #1530

@TLoD-Snake

+1 vote for this feature!

@jzelez

+1

@edwardsmit

+1 vote for this feature

@michaelirey

Loving elasticsearch... I would really benefit from this feature. Any update on the status of this issue?

@ghost
@michaelirey

Really just looking for a way to ask for all facets to be returned... Perhaps omitting the the size param or having it set to all. Right now I have it set to a really high number. See: http://stackoverflow.com/questions/12285371/elasticsearch-number-of-facets-returned

@jperelli

Why is this issue open and documentation says: "The size parameter controls how many facet entries will be returned. It defaults to 10. Setting it to 0 will return all terms matching the hits"?
http://www.elasticsearch.org/guide/reference/api/search/facets/terms-stats-facet.html
What is the truly behavior?

@tikitu

@jperelli the docs you're looking at are for the terms stats facet, not the terms facet: in the terms facet setting size to 0 just gives you no terms back.

@jperelli

You are right, in a closer look, I confused this issue with that part of the docs. Sorry!

@gjb83

+1

@kimchy
elastic member

Fellows, just an update, its high on our prio list!, we are going to go through the mentioned refactoring and implement it. Its simpler now with Lucene 4 upgrade effectively done.

@pjrt

+!

@pjrt

Isn't this already implemented with the "all_terms" option?

@tikitu
@joafeldmann

Since there is a "size" field, is it possible to also have a "from" field to paginate through facets?

@JohanTan

+1

@mbedna

+1

@bobrik

Any updates? @kimchy said about priority list 11 months ago :)

I noticed weird thing today: all_terms with terms_stats returns all terms, but with terms facet you should specify size explicitly.

I guess this is not going to happen, aggregations are coming.

@jpountz
elastic member

This feature has been implemented on aggregations (#4837). I am closing this issue as we are not going to modify facets anymore in order to focus on aggregations.

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