Overlap facets/aggregation


(Armand paghent) #1

Hello everyone,

I need to calculate a term aggregation with keys that can be included in
another one.

for example, il need to have a facet which gives results like :
"my_facet": {
"buckets": [
{
"key": -1,
"key_as_string": "-1",
"doc_count": 190,
"article_count": {
"doc_count": ...
}
},
{
"key": 6 OR -1,
"key_as_string": "5 OR -1",
"doc_count": 109,
"article_count": {
"doc_count": ...
}
},
{
"key": 5 OR -1,
"key_as_string": "5 OR -1",
"doc_count": 74,
"article_count": {
"doc_count": ...
}
}
]
}

Is it possible ?

(I know that I can do it, if I already know the distinct values of my
buckets, and use differents filtered aggregations for each value but this
is not what I want.)

Thanks for your help
Regards
Armand

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/d300b05d-d6f2-4d21-b732-f558c26e51df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(system) #2