Hi All,
We've noticed that on updating a document completion field that the results will then return both the old document completion field and the updated version. If I update again we continue to get 2 results - the original and the latest updated value.
We're using Nest, populating an object to be indexed.
The suggest field mapping:
"suggestField": {
"type": "completion",
"analyzer": "standard",
"payloads": true,
"context": {
"lang": {
"type": "category",
"default": [ "en" ]
},
"stock": {
"type": "category",
"default": [ "GPS" ]
}
}
}
But I see the issue when I update this document and query it:
Example Sense query:
GET savills-alias/elasticlocationsynonyms/_search
{
"size":0,"suggest":{"textsuggest":{"text":"sw9","completion":{"context":
{"lang":"en","stock":"GRS_PT"},"field":"suggestField","size":10}}}
}
I get more than one result - the first indexed plus the latest updated.
Output:
{
"took": 5,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 1032041,
"max_score": 0,
"hits": []
},
"suggest": {
"textsuggest": [
{
"text": "sw9",
"offset": 0,
"length": 3,
"options": [
{
"text": "SW9, England",
"score": 0,
"payload": {
"locationId": "45756",
"autoCompleteKey": "SW9, England",
"translatedAutoCompleteKey": "SW9, England",
"language": "en",
"population": 0,
"country": "England",
"flagFileName": "flag-england.png",
"synonymId": 2827453
}
},
{
"text": "SW9, England-TEST3",
"score": 0,
"payload": {
"locationId": "45756",
"autoCompleteKey": "SW9, England-TEST3",
"translatedAutoCompleteKey": "SW9, England-TEST3",
"language": "en",
"population": 0,
"country": "England",
"flagFileName": "flag-england.png",
"synonymId": 2827453
}
}
]
}
]
}
}
The synonymId in both results is the documentId so it isn't being duplicated.
Any ideas? I see there have been some issues with the completion field and deletes in the past. Is this potentially something along the same lines?
ES version 2.3.0. Let me know if you need anymore details.
Thanks
Cara