Question

When I enter a search query, Magento returns "no results". I am not using any search-related extensions. Already tried reindexing.

Where should I start debugging this?

I am running Magento 2.2.8

Was it helpful?

Solution

Solved this problem, apparently there was a problem with the indexer, which failed on duplicated entries on catalog_product_index_eav_temp:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '3196-193-1-170-3196' for key 'PRIMARY', query was: INSERT  INTO `catalog_product_index_eav_temp` (`entity_id`,`attribute_id`,`store_id`,`value`,`source_id`) VALUES (?, ?, ?, ?, ?), (?, ?, ?, ?, ?)

To fix it I had to manually update +- 100 records in the catalog_product_entity_varchar table. For example: update value=170,170 to value=170

OTHER TIPS

Please check in admin product attributes set as searchable.

eg:

  1. Store >> Attributes >> Product
  2. Search for Name
  3. Check Storefront Properties >> Use in Search set as YES
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top