I am trying to get unique values from elasticsearch using this dsl query
{
"aggs": {
"distinct": {
"terms": {
"field": "model",
"size": 0
}
}
}
}
The problem with this is that if I have two models i.e. moto g and htc one, I get four results, moto, g, htc, one. How can I configure it to return two results?