Since switching search engine to ElasticSearch 7.9.1 (necessary for Magento 2.4.0) my site has only been able to search the catalog with a single word. When two or more are entered the front end reports "no products found" but in the exception log is this clue:

field:[sku] was indexed without position data; cannot run PhraseQuery

The message comes from Elasticsearch which I know nothing about but this page gives me hope that it can be fixed. The confusing part is that SKU field is not supposed to be searchable. Also I cannot imagine this would be a pre-existing bug that got by Magento's devs unnoticed.

So what is the solution? How can the search schema be corrected or can SKU be excluded from search altogether? I would prefer the latter as the schema is probably rebuilt on a full reindex and that would reset any fix.

Update We found a workaround by setting SKU attribute to be searchable and then running:

bin/magento indexer:reindex catalogsearch_fulltext

This isn't ideal as SKU wasn't intended to be exposed to customers.

  • I found the same issue in my server found any solution? Commented Oct 19, 2020 at 10:11
  • As usual, there is no budget for chasing proper fixes so I didn't get to try anything else here. Commented Oct 20, 2020 at 11:03

1 Answer 1


As far as I know, Magento 2.4.x only works with ElasticSearch 7.6.x

  • Thanks for the good suggestion. I tried with 7.6 and it made no difference. This is understandable as Magento's own docs say it "is tested with Elasticsearch 7.6.x. You can use other versions" which is not the same as a hard requirement. Commented Jan 19, 2021 at 15:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.