Hello,
How can I retrieve distinct values from multiple fields in elasticsearch ?
I have used the below method, but it seems too nested. Can someone provide a more efficient way of doing it ?
{
"size":"0",
"aggs" : {
"uniq_lest" : {
"terms" : { "field" : "Area.keyword" },
"aggs" : {
"uniq_test" : {
"terms" : { "field" : "Locati.keyword"},
"aggs" : {
"uniq_mest" : {
"terms" : { "field" : "Age.keyword"}
}
}
}
}
}
}
}