Are synonyms in Elastic Search (version 6.2.3) stored in the items when these are created/updated or are synonyms applied in every search query to the index?
We need to remove the synonyms of an index with 6 million items and I cannot see in the documentation if removing these synonyms from the index will be enough
DELETE /api/as/v1/engines/{ENGINE_NAME}/synonyms/{SYNONYM_SET_ID}
Or it is needed to reindex all the items afterwards, in which case it might be better to delete the current index and create a new one.
If synonyms are applied during inserting the document
If synonyms are applied during query time
Now the question is whether you are using index-time-analysis or query-time-analysis. You can check in your mappings. E.g
"mappings": {
"properties": {
"text": {
"type": "text",
"analyzer": "autocomplete", // <======== For index time analysis
"search_analyzer": "synonym_analyzer" //<====== For Query time analysis
}
}
}
}