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

Improve search mechanism, allow mistakes in search word #14588

Closed
matthieu-rolland opened this issue Jul 11, 2019 · 1 comment
Closed

Improve search mechanism, allow mistakes in search word #14588

matthieu-rolland opened this issue Jul 11, 2019 · 1 comment
Labels
Feature Type: New Feature Must-have Kanban prioritization: issue must be included in next version PR available Solution: issue is being addressed Search Label: Which BO under menu is concerned

Comments

@matthieu-rolland
Copy link
Contributor

matthieu-rolland commented Jul 11, 2019

Is your feature request related to a problem? Please describe.

This feature request is related to this issue:
#12407

There are two problems with the product search mechanism:

Search words are stored in a table called 'search_word':

1/ Our word length in the search_word table is fixed, so looking for a product whose name is longer than its 'word' column's length won't work if we type the word entirely or even only the end of the word, since the word is truncated in the search_word table.

2/ If we make a mistake in the search term, ex: appre instead of apple, then the search won't work.

Describe the solution you'd like
A solution that could mitigate both those issues would be to implement a Levenshtein distance mechanism.

Basically we could create a Levenhstein search function in mysql, this function would be created during the prestashop install process (after creating the database).

Here is an example of how it is implemented in mysql.

Also checkout this stackoverflow .

The use of this mechanism could be made optional, by making it configurable in the backoffice.

Describe alternatives you've considered
An easier alternative would be to set a much bigger column length to search_word's word column.

@khouloudbelguith
Copy link
Contributor

Ping @PrestaShop/prestashop-core-developers what do you think?

Thanks!

@matthieu-rolland matthieu-rolland added Feature Type: New Feature Improvement Type: Improvement labels Jul 11, 2019
@khouloudbelguith khouloudbelguith added Search Label: Which BO under menu is concerned Waiting for dev Status: action required, waiting for tech feedback labels Jul 11, 2019
@marionf marionf added this to Backlog in PrestaShop 1.7.7.3 via automation Oct 17, 2019
@marionf marionf moved this from Backlog to To be tested in PrestaShop 1.7.7.3 Oct 17, 2019
@marionf marionf removed Improvement Type: Improvement Waiting for dev Status: action required, waiting for tech feedback labels Oct 17, 2019
@colinegin colinegin moved this from To be tested to To be reviewed in PrestaShop 1.7.7.3 Oct 31, 2019
@colinegin colinegin added the PR available Solution: issue is being addressed label Nov 4, 2019
@colinegin colinegin moved this from To be reviewed to To be tested in PrestaShop 1.7.7.3 Nov 25, 2019
@matthieu-rolland matthieu-rolland moved this from To be tested to To be reviewed in PrestaShop 1.7.7.3 Dec 4, 2019
@colinegin colinegin added the Must-have Kanban prioritization: issue must be included in next version label Dec 16, 2019
@eternoendless eternoendless moved this from To be reviewed to To be tested in PrestaShop 1.7.7.3 Dec 23, 2019
@marionf marionf closed this as completed Dec 24, 2019
PrestaShop 1.7.7.3 automation moved this from To be tested to Done Dec 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Type: New Feature Must-have Kanban prioritization: issue must be included in next version PR available Solution: issue is being addressed Search Label: Which BO under menu is concerned
Projects
No open projects
Development

No branches or pull requests

4 participants