Hi all,
I'm trying to find documents that have distinct values over 2 separate fields.
Documents have _id, filters.10,filters.20
For Example:
1, f10_1, f20_1
2, f10_1, f20_1
3, f10_2, f20_1
4, f10_3, f20_2
what I'm trying to find is:
1, f10_1, f20_1
4, f10_3, f20_2
2 documents that have bot filters.10 and filters.20 distinct
collapse only works on one field...
I tried:
{
"size":3,
"aggs": {
"uniq_10": {
"terms": {
"script": "doc['filters.10'].value+doc['filters.20'].value",
}
}
}
}
but it doesn't do what I need
any tips are welcome
Thanks