is there a way to get the "top 10" facets but at the same time get the *
count* of all the possible facets ( count(distinct(kingdom)) in SQL way) we
could have created (in that case, all distinct kingdoms in our document).
I know I could increase the "size" to a very big number, and count how many
facets are, only presenting the first 10, but then it generates a very big
JSON and processing costs may be much bigger.
A simple facet...
"facets" : {
"kingdom": {
"terms": {
"field": "kingdom",
"size": 10
}
}
i mean, i don't want to get something like {term:kingdom1, count:100} for
each possible facet (kingdom).I just want the first ten 'kingdoms' (the
more 'popular'), with its name and counts, but get also some info about how
many possible facets I could have generated.
hope I make me understand, thanks in advance
Pere
--