ElasticSearch is returning the following error upon reindexing a Magento 2.3 product catalog. I am unsure as to what the amasty_xsearch_fulltext.img is referring to.
Elasticsearch engine returned an error response. item id: 5019. Error type: "illegal_argument_exception", reason "startOffset must be non-negative, and endOffset must be >= startOffset, and offsets must not go backwards startOffset=430,endOffset=435,lastStartOffset=431 for field 'amasty_xsearch_fulltext.img'".
What are the offsets and where should I be looking to fix this issue?
You should delete synonyms from your Amasty ElasticSearch "Manage Synonyms" (System->Amasty ElasticSearch->Manage Synonyms)
For some reason it doesn't like when there are similar words or phrases connected to the original word.
Example: HDD, back up, back up drive
This throws an error for me.
I'm not an ElasticSearch specialist so I cant exactly say why this happens.
UPDATE:
Got official word from Amasty:
"Multi-word synonyms may not work properly with Elasticsearch engine, please refer to Elasticsearch documentation: https://www.elastic.co/guide/en/elasticsearch/guide/current/multi-word-synonyms.html
So looks like you can only use one word synonyms.
UDPATE: even after testing multiple times a working combination of words, on production site it failed.
I would not use that feature because its just unreliable and there is no validation on text input.