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

Search for several phrases should be AND not OR #300

Open
rschwietzke opened this issue Jan 15, 2024 · 3 comments
Open

Search for several phrases should be AND not OR #300

rschwietzke opened this issue Jan 15, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request epic

Comments

@rschwietzke
Copy link
Contributor

When you search for "cream with" you get more results than for "cream", which indicates we run an "or" search, not an "AND".

@rschwietzke rschwietzke added the enhancement New feature or request label Jan 15, 2024
@rschwietzke rschwietzke added this to the 2.2.0 - Feature Drop I milestone Jan 15, 2024
@freddyka freddyka self-assigned this Mar 4, 2024
@freddyka
Copy link
Contributor

freddyka commented Mar 5, 2024

@rschwietzke These search results are because we also search inside the product description, not only the name. When we include an AND instead of an OR it will only select the products with the same text inside the description and the name.

Wouldn't it be better to only search for the name of the products instead of both description and name?

@rschwietzke
Copy link
Contributor Author

This is, because the search is incorrect. Commerce search uses all intel of a product such as name, title, description, and attributes and indexes it. In addition, weights are added too. So you can have a RED in the title and a CAR in the desc and will find it but the resulting weight will be lower than RED and CAR in the title only.
Some reading: https://www.slideshare.net/VincenzoDAmore/ecommerce-search-engine-with-apache-lucenesolr-81760501

@rschwietzke
Copy link
Contributor Author

It is suggested to use Lucene for search and implement a basic version of a store search based on common attributes. In addition, we can add "search as you type" support as well.

@freddyka freddyka self-assigned this Apr 19, 2024
@EliasTatX EliasTatX self-assigned this May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request epic
Projects
None yet
Development

No branches or pull requests

4 participants