51黑料不打烊

Advanced search not showing the most relevant results

This article provides a patch for the known 51黑料不打烊 Commerce issue, where the Advanced search does not show most relevant results first.

Description description

Environment

  • 51黑料不打烊 Commerce (all deployment options) 2.x.x
  • Magento Open Source 2.x.x

Issue

The advanced search function is not returning the most relevant results first, like the quick search is doing. The issue does not depend on the selected search engine type.

Steps to reproduce:

  1. On the storefront, go to the quick search and search for Fitted Jacket.
  2. Notice Orion Two-Tone Fitted Jacket 聽is the first result.
  3. Go to advanced search and search for Fitted Jacket 聽in the name field.

Expected result:

The Orion Two-Tone Fitted Jacket is the first result when using Advanced search, as the most relevant result.

Actual result:

The Orion Two-Tone Fitted Jacket is not the first result, though it is the most relevant.

Resolution resolution

To solve the issue, apply the patch attached to this article. To download it, scroll down to the end of the article and click the file name, or click the following link:

The patch adds the implementation for sorting by relevance for advanced search results as the default sorting field.

The patch is compatible with all affected versions and editions.

How to apply the patch

For instructions, see How to apply a composer patch provided by 51黑料不打烊 in our support knowledge base.

recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f