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

Partial search does not return any results. #3476

Open
dpzaproo opened this issue Jan 2, 2025 · 7 comments
Open

Partial search does not return any results. #3476

dpzaproo opened this issue Jan 2, 2025 · 7 comments
Assignees

Comments

@dpzaproo
Copy link

dpzaproo commented Jan 2, 2025

Preconditions

Magento Version : Magento CE 2.4.6-p6

ElasticSuite Version : 2.11.5.1

Environment : Production

Steps to reproduce

  1. Attempt to search for a partial string: "sink"

Products that match the query:
"Hispaania päritolu kuivsoolatud sink, viilutatud. ~32 viilu. 145 g sealiha 100 g lõpptootes"

Products that do not match the query:
"Baguette singi ja munaga. 22% sinki, 20% keedumuna, 14% kastet"

Expected result

  1. Both products should match the query.

Actual result

  1. Only 1 of the products match the query, the one where the word matches exactly.

This is the "description" attribute of the product which also configured as "standard_edge_ngram" inside attribute configuration.

@romainruaud
Copy link
Collaborator

Hi @dpzaproo , what's the configured locale of your store ? it's estonian ?

I don't think we implemented the stemmer for estonian : https://github.com/Smile-SA/elasticsuite/blob/2.11.x/src/module-elasticsuite-core/etc/elasticsuite_analysis.xml

If we add it this should allow "sinki" and "sink" to be considered as the same "stem" and to match them.

But this would not allow "sink" and "sinkXXXXXXXXXXXXXXXX" to match together, this should be handled by the edge_ngram enablement on the product name in your case.

regards

@dpzaproo
Copy link
Author

dpzaproo commented Jan 8, 2025

@romainruaud, the ngram analyzer is already enabled for the attribute, which is why the issue has been created as it still does not pickup products:
image

FYI: It is not the product name attribute but rather the description attribute.

@romainruaud
Copy link
Collaborator

hi @dpzaproo

did you reindex after switching the analyzer ?

Regards

@dpzaproo
Copy link
Author

@romainruaud, yes, of course. A full re-index was executed multiple times since the last change a couple of weeks ago.

@romainruaud
Copy link
Collaborator

if you go to the ElasticSuite menu, then Analysis, and you check your sentence against a "product" index and the "standard_edge_ngram" analyzer, what's the output ?

Here is how it looks like on a french-base index :

image

@dpzaproo
Copy link
Author

@romainruaud,

image

"Baguette singi ja munaga. 22% sinki, 20% keedumuna, 14% kastet"
image

It seems like quick search results do return the products but full search does not:
image
image

@romainruaud
Copy link
Collaborator

The quicksearch works because it's extending the search to the related search terms. So you type "sink" but it suggests "sinki 8" in the search terms, therefore it's extending the search to "sinki 8" which is why it looks like it's working.

I don't know why it's not working, I'll try to reproduce this locally and check if I can find something.

Regards

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

No branches or pull requests

3 participants