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

Misspelling tolerant search #338

Open
lhannest opened this issue Mar 5, 2022 · 2 comments
Open

Misspelling tolerant search #338

lhannest opened this issue Mar 5, 2022 · 2 comments

Comments

@lhannest
Copy link

lhannest commented Mar 5, 2022

If a search fails to return results, then perform a secondary closest match search.

For example, I search "iron gollem" and there are no results.

Now the application should try to predict what I was trying to search.

"iron" matches results, so keep it.
"gollem" does not match results, so try to guess an appropriate substitution term.

"gollem" is one character away from a match "golem", and "golem" is a term that yields results.

So now display text like: No matches found, did you mean "iron golem"? And then display matches for "iron golem".

@augustjohnson
Copy link
Collaborator

While I'm not sure that this is the solution, a fuzzy searching algorithm would be probably the best path forward to meet this:
https://github.com/vsemionov/django-rest-fuzzysearch

There may be something in the SQL layer that could be implemented:
https://www.freecodecamp.org/news/fuzzy-string-matching-with-postgresql/ maybe?

Either way, this is a complicated solution that requires some additional design.

@daydin
Copy link

daydin commented Oct 2, 2023

I'm interested in working on this, but would need an extra pair of hands. (not super experienced in search stuff)

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

No branches or pull requests

3 participants