Hi,
When I perform a term aggregation on FIELD1 and a term aggregation on FIELD2, I got the following result:
FIELD1 : {
TOPTERM1FIELD1 : 10000,
TOPTERM2FIELD1 : 1000
}
and
FIELD2 : {
TOPTERM1FIELD2 : 121212,
TOPTERM2FIELD2 : 1212
}
If I combine the two aggregations with the help of the "sub-aggregation" mechanism, I get :
FIELD1 : {
TOPTERM1FIELD1 : {
FIELD2 : {
LOCALTOPTERM1FIELD2: 12
}
}
}
etc....
I would like to have all combinations of the n first terms for the two top terms:
For exemple :
TOPTERM1FIELD1 AND TOPTERM1FIELD2 : 12
TOPTERM1FIELD1 AND TOPTERM2FIELD2 : 4
I tried the composite aggregation to achieve this but it seems that it collects ordered terms and not most frequent terms first.
Is there a way to achieve this?
Thank you for your help,
Aurélien