I just upgrade to magento 2.4.6-p3 from 2.4.1 version, when i see the exception.log files, there are a lot of error stating this:

main.CRITICAL: Elasticsearch\Common\Exceptions\BadRequest400Exception: {"error":{"root_cause":[{"type":"query_shard_exception","reason":"failed
 to create query: For input string: \"7640_7659\"","index_uuid":"pN9D8szyQT6fjQcPbh3_vg","index":"prod24_product_1_v104"}],"type":"search_phase_execution_exception","reason":"all
 shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"prod24_product_1_v104","node":"T9hZWkfdQfqsfGSdu8BvHw","reason":{"type":"query_shard_exception
","reason":"failed to create query: For input string: \"7640_7659\"","index_uuid":"pN9D8szyQT6fjQcPbh3_vg","index":"production24_product_1_v104","caused_by":{"type":"number_format_exce
ption","reason":"For input string: \"7640_7659\""}}}]},"status":400} in /data/vhosts/prod/kw2020/htdocs/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connectio

i'm not sure if this related to the product eav or not, but the error trace is coming from the category page layered navigation

/data/vhosts/prod/kw2020/htdocs/vendor/magento/module-elasticsearch-7/SearchAdapter/Adapter.php(117): Magento\Elasticsearch7\Model\Client\Elasticsearch\Interceptor->query()
/data/vhosts/prod/kw2020/htdocs/vendor/magento/module-search/Model/SearchEngine.php(42): Magento\Elasticsearch7\SearchAdapter\Adapter->query()

/vendor/magento/framework/Search/Search.php(85): Magento\Search\Model\SearchEngine->search()

when i checked one of the error log record, it is also showing this:

{"error":{"root_cause":[{"type":"parsing_exception","reason":"[term] que
ry doesn't support multiple fields, found [product_attribute_1] and [product_attribute_2]","line":1,"col":261}],"type":"x_content_parse_exception","reason":"[1:261] [bool] failed to parse field
 [must]","caused_by":{"type":"parsing_exception","reason":"[term] query doesn't support multiple fields, found [product_attribute_1] and [product_attribute_2]","line":1,"col":261}},"status":400
} in 

  • Please check whether your cron is running or not, and also check elasticsearch connection from store -> configuration -> catalog -> catalog -> catalog search. Mar 13 at 4:47
  • @MitulVadalia my cron is running and elasticsearch is connected
    – jojo
    Mar 13 at 4:50

1 Answer 1


From your exception: looks like Magento creates a query using a string for a number field. You may check (log) the full query before sending the ES.

7640_7659 is not an integer (number).

Here is actual error:

{"type":"number_format_exce ption","reason":"For input string: \"7640_7659\""
  • it's trying to search for two product attributes value
    – jojo
    Mar 19 at 3:57
  • Then change the type to the string instead. You can change that during indexing.
    – Sohel Rana
    Mar 19 at 7:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.