Reputation: 14717
I am learning Elasticsearch by reading the book called Elasticsearch Cookbook (2ed). It has the following sample query:
{
"query": {
"match_all": {}
},
"aggs": {
"tag": {
"terms": {
"field": "tag",
"size": 10
}
}
}
}
According to the book,
size (by default 10): This controls the number of facets value that is to be returned.
I am curious about this: how to return all facet values if I don't know the total number of facet values in advance?
Sorry if my question is so obvious.
Thanks and regards.
Upvotes: 1
Views: 1864
Reputation: 2232
set size to 0 (which is the same as setting it to Integer.MAX_VALUE)
Be careful though, as this will perform horribly if you have a lot of facet values.
Upvotes: 1