After upgrade Magento from 2.3.5 to Magento 2.4.2, the categories page doesn’t show any product. I have change Search Engine to Elasticsearch 7. When I check log, I found a bug:
[2021-03-19 08:32:17] main.CRITICAL: {"error":{"root_cause":[{"type":"query_shard_exception","reason":"No mapping found for [product_id] in order to sort on","index_uuid":"ZqaXmQlfQVqUEMFKpGUziw","index":"magecusabio_product_8_v1"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"magecusabio_product_8_v1","node":"bhY-5xWvQ02x5cizTVMtKw","reason":{"type":"query_shard_exception","reason":"No mapping found for [product_id] in order to sort on","index_uuid":"ZqaXmQlfQVqUEMFKpGUziw","index":"magecusabio_product_8_v1"}}]},"status":400} {"exception":"[object] (Elasticsearch\Common\Exceptions\BadRequest400Exception(code: 400): {"error":{"root_cause":[{"type":"query_shard_exception","reason":"No mapping found for [product_id] in order to sort on","index_uuid":"ZqaXmQlfQVqUEMFKpGUziw","index":"magecusabio_product_8_v1"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"magecusabio_product_8_v1","node":"bhY-5xWvQ02x5cizTVMtKw","reason":{"type":"query_shard_exception","reason":"No mapping found for [product_id] in order to sort on","index_uuid":"ZqaXmQlfQVqUEMFKpGUziw","index":"magecusabio_product_8_v1"}}]},"status":400} at /www/wwwroot/default/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:632)"} []