Customers could not find products through the search engine even though products were visible in categories. Searching by SKU, name and description returned no results. The problem grew over 2 weeks after migrating to a new server. Fix time: 2 hours.
Symptoms
- Search returns “No products found” for all queries
- Products are visible in categories and accessible via direct URL
- Problem appeared after server migration
- Reindex of
catalogsearch_fulltextcompletes without errors but changes nothing
Cause
After server migration, OpenSearch was running on a new IP. Magento’s configuration still had the old address. Indexing “completed successfully” because Magento was not checking the OpenSearch response – data was going nowhere.
Solution
bin/magento config:set catalog/search/engine opensearch bin/magento config:set catalog/search/opensearch_server_hostname localhost bin/magento config:set catalog/search/opensearch_server_port 9200 bin/magento indexer:reset catalogsearch_fulltext bin/magento indexer:reindex catalogsearch_fulltext # Verify document count curl http://localhost:9200/magento2_product_1_v*/_count bin/magento cache:flush
Takeaways
After any server migration check all external services: OpenSearch, Redis, RabbitMQ. Add monitoring that verifies not just that a process is running but that it actually returns correct data (document count in OpenSearch should match product count).
