PHP / Magento Dev Blog

  • Home

Magento 2 products not appearing in search – OpenSearch problem

by Henryk Tews / Friday, 03 July 2026 / Published in Magento / Adobe Commerce

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_fulltext completes 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).

About Henryk Tews

What you can read next

Xdebug – configuration, PHPStorm, debugging Magento plugins
Strategy pattern in PHP – and how Magento 2 uses it in pricing

© 2026 Created by

TOP
Zarządzaj zgodą
Aby zapewnić jak najlepsze wrażenia, korzystamy z technologii, takich jak pliki cookie, do przechowywania i/lub uzyskiwania dostępu do informacji o urządzeniu. Zgoda na te technologie pozwoli nam przetwarzać dane, takie jak zachowanie podczas przeglądania lub unikalne identyfikatory na tej stronie. Brak wyrażenia zgody lub wycofanie zgody może niekorzystnie wpłynąć na niektóre cechy i funkcje.
Funkcjonalne Always active
Przechowywanie lub dostęp do danych technicznych jest ściśle konieczny do uzasadnionego celu umożliwienia korzystania z konkretnej usługi wyraźnie żądanej przez subskrybenta lub użytkownika, lub wyłącznie w celu przeprowadzenia transmisji komunikatu przez sieć łączności elektronicznej.
Preferencje
Przechowywanie lub dostęp techniczny jest niezbędny do uzasadnionego celu przechowywania preferencji, o które nie prosi subskrybent lub użytkownik.
Statystyka
Przechowywanie techniczne lub dostęp, który jest używany wyłącznie do celów statystycznych. Przechowywanie techniczne lub dostęp, który jest używany wyłącznie do anonimowych celów statystycznych. Bez wezwania do sądu, dobrowolnego podporządkowania się dostawcy usług internetowych lub dodatkowych zapisów od strony trzeciej, informacje przechowywane lub pobierane wyłącznie w tym celu zwykle nie mogą być wykorzystywane do identyfikacji użytkownika.
Marketing
Przechowywanie lub dostęp techniczny jest wymagany do tworzenia profili użytkowników w celu wysyłania reklam lub śledzenia użytkownika na stronie internetowej lub na kilku stronach internetowych w podobnych celach marketingowych.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
Zobacz preferencje
  • {title}
  • {title}
  • {title}