I am using Elasticsearch v5.1.1 and getting duplicates back in my results. I thought Completion Suggesters automatically filtered these out.
Am I doing something wrong?
Query:
GET /companies/company/_search
{
"_source": ["DbaName","company-suggest"],
"suggest": {
"company-suggest": {
"prefix": "grill",
"completion": {
"field": "company-suggest"
}
}
Top 3 results:
"suggest": {
"company-suggest": [
{
"text": "grill",
"offset": 0,
"length": 5,
"options": [
{
"text": "Grill",
"_index": "companies",
"_type": "company",
"_id": "183221",
"_score": 1,
"_source": {
"DbaName": "Grill",
"company-suggest": [
"183221",
"Grill"
]
}
},
{
"text": "Grill",
"_index": "companies",
"_type": "company",
"_id": "12460",
"_score": 1,
"_source": {
"DbaName": "Grill",
"company-suggest": [
"12460",
"Grill"
]
}
},
{
"text": "Grill",
"_index": "companies",
"_type": "company",
"_id": "297860",
"_score": 1,
"_source": {
"DbaName": "Grill",
"company-suggest": [
"297860",
"Grill"
]
}
},