MySQL and ElasticSearch show different results

Last update: 2024-02-16
WARNING

MySQL catalog search engine will be removed in Adobe Commerce 2.4.0. You must have the Elasticsearch host set up and configured prior to installing version 2.4.0. Refer to Install and configure Elasticsearch in our developer documentation.

This article provides a patch for the known Adobe Commerce on cloud infrastructure 2.2.3 issue related to getting different search results for the same search query with MySQL and ElasticSearch.

Issue:

Your catalog search results with the same filter set differ depending on the search engine being used, MySQL or ElasticSearch.

Steps to reproduce :

  1. Install and configure ElasticSearch.
  2. On the storefront, select one of the filters.
  3. Make a note of the number of matching products.
  4. Configure the default MySQL search.
  5. On the storefront, select one of the filters.
  6. Make a note of the number of matching products.

Expected result:
The number of matching products is the same.

Actual result:
The number of matching products is different.

Patch

The patches are attached to this article. To download a patch, scroll down to the end of the article and click the required file name, or click on the following links:

Download MDVA-12312_EE_2.2.3_COMPOSER_v1.patch

Download MDVA-14172_EE_2.2.6_COMPOSER_v1.patch

Compatible Adobe Commerce versions:

The patches were created for:

  • Adobe Commerce on cloud infrastructure 2.2.3 (the MDVA-12312_EE_2.2.3_COMPOSER_v1.patch file)
  • Adobe Commerce on cloud infrastructure 2.2.6 (the MDVA-14172_EE_2.2.6_COMPOSER_v1.patch file)

The MDVA-12312_EE_2.2.3_COMPOSER_v1.patch patch is also compatible (but might not solve the issue) with the following Adobe Commerce versions and editions:

  • Adobe Commerce on cloud infrastructure 2.2.4
  • Adobe Commerce on cloud infrastructure 2.2.5
  • Adobe Commerce on-premises 2.2.3
  • Adobe Commerce on-premises 2.2.4
  • Adobe Commerce on-premises 2.2.5

The MDVA-14172_EE_2.2.6_COMPOSER_v1.patch patch is also compatible (but might not solve the issue) with the following Adobe Commerce versions and editions:

  • Adobe Commerce on-premises 2.2.6

How to apply the patch

See How to apply a composer patch provided by Adobe in our support knowledge base for instructions.

Attached Files

On this page