Magento 2.4 needs OpenSearch or Elasticsearch for catalog search. When you check the cluster’s health, it often reports yellow. That sounds like a warning, but on most Magento stores it is completely normal.
What yellow means
Green means all copies of the search index are in place. Yellow means the main copy works but the backup copies, called replicas, have nowhere to live. Search keeps working normally for customers.
Check it
curl 'localhost:9200/_cluster/health?pretty'
curl 'localhost:9200/_cat/nodes?v'
One node: expected, and easy to make green
Most Magento stores run a single search node. A replica can never be placed on the same node as the original, so it stays unassigned forever and the cluster stays yellow. To make it green, tell the indexes not to expect replicas:
curl -X PUT 'localhost:9200/_all/_settings' \
-H 'Content-Type: application/json' \
-d '{"index":{"number_of_replicas":0}}'
Several nodes: a real problem
If your cluster should have more than one node and _cat/nodes shows fewer, a node has stopped or lost its network connection. The cluster is running without redundancy until it comes back. Check the missing node’s service and logs.
When it is red
Red means some main index data is not available, and search will fail for part of the catalog. Check disk space first, because OpenSearch stops accepting writes when the disk is nearly full. Then check its logs and rebuild the search index:
bin/magento indexer:reindex catalogsearch_fulltext
Catch it automatically
MageMonitor checks for this every few minutes as part of its Search checks, and alerts you by email, Slack or webhook the moment it appears, with the exact commands to fix it. See MageMonitor for Magento 2.
