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

Fuzzy search is taking too long #5282

Open
lukasmueller opened this issue Jan 25, 2025 · 3 comments
Open

Fuzzy search is taking too long #5282

lukasmueller opened this issue Jan 25, 2025 · 3 comments
Assignees
Labels
Priority: Critical Issue/PR requires immediate resolution. Type: Feature Request Issue proposes a potential new feature.

Comments

@lukasmueller
Copy link
Member

As a temporary workaround, remove requirement for curator role to deactivate fuzzy search

@lukasmueller lukasmueller self-assigned this Jan 27, 2025
@lukasmueller lukasmueller added Priority: Critical Issue/PR requires immediate resolution. Type: Feature Request Issue proposes a potential new feature. labels Jan 27, 2025
@dwaring87
Copy link
Member

I don't know how the fuzzy search is implemented in breedbase, but there are ways of doing an edit distance query directly in postgres: https://medium.com/@simeon.emanuilov/levenshtein-distance-in-postgresql-a-practical-guide-ef8262f595ae

To enable the function: CREATE EXTENSION fuzzystrmatch;

Then, you can query the database to find matches:

SELECT * FROM stock WHERE levenshtein(uniquename, 'SEARCH TERM') <= 3

@lukasmueller
Copy link
Member Author

lukasmueller commented Jan 30, 2025 via email

@lukasmueller
Copy link
Member Author

Replace the fuzzy search in the accession upload with this method; also add a fuzzy search to the list validation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Critical Issue/PR requires immediate resolution. Type: Feature Request Issue proposes a potential new feature.
Projects
None yet
Development

No branches or pull requests

2 participants