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

Searches on vocabularies should tolerate at least case changes #384

Open
MattBlissett opened this issue Feb 12, 2025 · 4 comments
Open

Searches on vocabularies should tolerate at least case changes #384

MattBlissett opened this issue Feb 12, 2025 · 4 comments
Assignees

Comments

@MattBlissett
Copy link
Member

Previous searches would have used all-caps enum values: https://api.gbif-uat.org/v1/occurrence/search?sex=MALE

It seems unnecessarily strict to not allow this value to continue to work.

@marcos-lg
Copy link
Contributor

This can be fixed with this PR in pipelines but it requires reindexing the datasets gbif/pipelines#1103

@MortenHofft
Copy link
Member

Instead of just lowercase normalizer would it be worth using a different normalizer like camelCase or such?
so that TYPE_STATUS also match the new vocab value TypeStatus

@marcos-lg
Copy link
Contributor

Instead of just lowercase normalizer would it be worth using a different normalizer like camelCase or such? so that TYPE_STATUS also match the new vocab value TypeStatus

Concept names don't allow underscores. And the lowercase normalizer fixes all the searches with different cases, camelCase included.

@MortenHofft
Copy link
Member

Thanks @marcos-lg
I wasn't very clear. I justed wanted to highlight that not all old values can be fixed this way. E.g. typeStatus:TYPE_GENUS wont work since the difference isn't just in upper and lowercase letters. It is the presence of an underscore as well.

That might be fine. I guess it depends on how much we want queries that use old enums values to still work. 95% will probably be caught with your suggestion. Which is probably fine.

@marcos-lg marcos-lg self-assigned this Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants