Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Product Search Issue: Incomplete Results for Partial Product Name or SKU in Elasticsuite #3278

Open
adriyanj0 opened this issue May 21, 2024 · 5 comments
Assignees
Labels

Comments

@adriyanj0
Copy link

adriyanj0 commented May 21, 2024

We are having trouble with the product search on our Magento 2 site using the Elasticsuite module. When customers type part of a product name or SKU, the search results are incomplete or missing. For example, typing "46" only shows products with "46" exactly in the SKU or title. It does not show products containing "146," "1046," or "460."

Steps to Reproduce:

  1. Go to the search bar on our Magento 2 site.
  2. Type part of a product name or SKU (e.g., "46").
  3. Check the search results.

Expected Behavior:
The search should show all products that include the typed part, such as "146," "1046," and "460."

Actual Behavior:
Only products with the exact match "46" are shown. Sometimes, no results are displayed even when typing the full product name or SKU.

Request for Help:
We need help to configure Elasticsuite so it shows better search results. Specifically:

Settings or adjustments to improve partial match results.

  1. Key parameters in Elasticsuite to check.
  2. Best practices for optimizing search results.
  3. Thank you for your assistance.

Environment:
Magento 2 version: 2.4.6-p4
ElasticSuite Open Source version.

@vahonc
Copy link
Collaborator

vahonc commented May 21, 2024

Hello @adriyanj0,

Which version of Elasticsuite you are using?

BR,
Vadym

@adriyanj0
Copy link
Author

Hello @adriyanj0,

Which version of Elasticsuite you are using?

BR, Vadym

Hello,

We`re using ElasticSuite Open Source version.

BR,

@vahonc
Copy link
Collaborator

vahonc commented May 22, 2024

@adriyanj0,

That's not what I wanted to hear. I need detailed information. In the Magento BO in the lower right corner (in the footer), you should see something like this:

Adobe Commerce ver. 2.4.6
ElasticSuite Open Source ver. 2.11.0

BR,
Vadym

@adriyanj0
Copy link
Author

@vahonc

The version that we use is ElasticSuite Open Source ver. 2.11.4.1. My bad

@adriyanj0,

That's not what I wanted to hear. I need detailed information. In the Magento BO in the lower right corner (in the footer), you should see something like this:

Adobe Commerce ver. 2.4.6
ElasticSuite Open Source ver. 2.11.0

BR, Vadym

@vahonc
Copy link
Collaborator

vahonc commented May 24, 2024

@adriyanj0, sorry for the late response

Unfortunately, what you want to do cannot be done out of the box, in other words, there is no easy way to implement such behavior.

You might solve some of your cases by activating the settings we added in a couple previous releases. If on your version of Elasticsuite you don't find these settings please update/reinstall our module.

  • For instance, matching 460 by searching 46 with the settings related to removing leading and trailing 0 in SKUs.

Stores > Configuration > Elasticsuite > Analyzers Settings > Remove leading zeroes of numeric parts / Remove trailing zeroes of numeric parts

Screenshot from 2024-05-23 18-05-52

Screenshot from 2024-05-23 17-37-44

  • For the other situations, maybe enabling the experimental settings by adding the "reference" analyzer when using the term vectors

Elasticsuite > Search Relevance > Spellchecking Configuration > Term Vectors Configuration > [Experimental] Use reference analyzer in term vectors

Screenshot from 2024-05-23 17-41-12

But then I'm not 100% sure you will be able to match 146 from 46 since in the reference analyzer we do not split contiguous tokens (series of pure digits or letters) while we do split alphanumerical ones 146AB37-D5 => 146 AB 37 D 5
Yes, the fuzziness could go from 46 to 146 but the fuzziness prefix will prevent modifying the first letter, so I don't see that happening. If you really need that behavior, you could try to change the analyzer of the SKU attribute from "reference" to "standard_edge_ngram"

Screenshot from 2024-05-23 17-43-34

But again, I'm not even sure it will allow matching 146 from 46 since "146" will be indexed at best as "14, 146".

BR,
Vadym

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants