I am really new to elasticsearch world.
Let\'s say I have a nested aggregation on two fields : field1
and field2
:
{
.
Next time, M'sieur Toph' : RTFM !!!
I feel really dumb: I found the anwser in the manual, 30 seconds after asking. I don't remove my question because, it can help, who knows...
Here is the anwser :
You can specify the min_doc_count
property in the terms
aggregation.
It gives you :
{
...
aggs: {
field1: {
terms: {
field: 'field1',
min_doc_count: 1000
},
aggs: {
field2: {
terms: {
field: 'field2',
min_doc_count: 1000
}
}
}
}
}
}
You also can specify a specific minimal count for each level of your aggregation.
What else ? :)