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

Taxon autocomplete should handle non-trailing single-letter mistakes #203

Open
kueda opened this issue Jul 16, 2020 · 2 comments
Open

Taxon autocomplete should handle non-trailing single-letter mistakes #203

kueda opened this issue Jul 16, 2020 · 2 comments

Comments

@kueda
Copy link
Member

kueda commented Jul 16, 2020

Currently, if you're searching for https://www.inaturalist.org/taxa/35131-Salomonelaps, some typos fail to return results, while others seem to get results

Search Does it work?
https://api.inaturalist.org/v1/taxa/autocomplete?q=Solomonelaps No
https://api.inaturalist.org/v1/taxa/autocomplete?q=Salomoneleps No
https://api.inaturalist.org/v1/search?q=Solomonelaps No
https://api.inaturalist.org/v1/search?q=Salomoneleps Yes

Vowel substitutions like that seem like common mistakes we should be forgiving, so IMO, all those should work to find https://www.inaturalist.org/taxa/35131-Salomonelaps. At the very least I think the taxon autocomplete should handle Salomoneleps the way that the universal search endpoint does. Might be a more appropriate issue for the Rails repo where we define the indices, but I figured my first step would be figuring out what I did differently for the universal search endpoint in the API.

@pleary
Copy link
Member

pleary commented Dec 21, 2023

The change I made in the branch at 442d31d results in all 4 of these searches working. It reduces the prefix_length used by the universal search to 1, meaning only the first character of the searched term must match the real value, and enables fuzzy searching for taxon autocomplete in the same way that universal search is doing. We should test this to make sure this is a net positive change - that more often if there are taxa included they are useful due to misspellings, rather than extraneous results users may not want to see.

@kueda
Copy link
Member Author

kueda commented Dec 21, 2023

Can to get think of a good way to measure whether it's a net positive change aside from a gut check? One could imagine search success defined as the number of searches a user makes in a 15 min window that are all below a threshold levenstein distance, i.e. how much do they have correct typos before finding what they want.

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

2 participants