Do not log search "errors" that come from bad layered nav queries like ?color=blue instead of ?color=98 diff --git a/vendor/magento/module-elasticsearch-7/SearchAdapter/Adapter.php b/vendor/magento/module-elasticsearch-7/SearchAdapter/Adapter.php --- a/vendor/magento/module-elasticsearch-7/SearchAdapter/Adapter.php +++ b/vendor/magento/module-elasticsearch-7/SearchAdapter/Adapter.php @@ -116,7 +116,9 @@ try { $rawResponse = $client->query($query); } catch (\Exception $e) { - $this->logger->critical($e); + if (!($e instanceof \Elasticsearch\Common\Exceptions\BadRequest400Exception && str_contains($e->getMessage(), 'number_format_exception'))) { + $this->logger->critical($e); + } // return empty search result in case an exception is thrown from Elasticsearch $rawResponse = self::$emptyRawResponse; }