Is there are way to fetch all matching facets in elasticsearch query.
According to the link given here:
http://www.elasticsearch.org/guide/reference/api/search/facets/terms-facet/
it is possible to get the facet which N size. But what if I want to get all
matching facets?
I tried specifying "size: 0" in my facet query, but that didn't seem to
work.
Here is my sample ES query
query: {
..
}
facets: {
company: {
terms: {
field: "company"
size: N
}
}
}
--
Thanks,
Aash
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hi Aash,
Sadly, there is currently no official way of getting all the terms which
have a count>0 . Of course you can cheat by using a very high size
parameter (like 1000 or 10K or what ever you think you application
consideres close enough to all). If you need a complete picture, you can
use the all_terms:true option to get a complete list of all terms, even
those who has 0 count in the result set. Watch out for performance problems
if your field a very large number of terms in the index.
Cheers,
Boaz
On Friday, May 3, 2013 12:49:21 PM UTC+2, geeky_sh wrote:
Is there are way to fetch all matching facets in elasticsearch query.
According to the link given here:
Elasticsearch Platform — Find real-time answers at scale | Elastic
it is possible to get the facet which N size. But what if I want to get
all matching facets?
I tried specifying "size: 0" in my facet query, but that didn't seem to
work.
Here is my sample ES query
query: {
..
}
facets: {
company: {
terms: {
field: "company"
size: N
}
}
}
--
Thanks,
Aash
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.