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

Add iconic_taxon_name to observations.taxonomy response #414

Merged
merged 2 commits into from
Nov 3, 2023

Conversation

kueda
Copy link
Member

@kueda kueda commented Nov 2, 2023

This would allow me to use the iconic_taxon_name to provide some flexibility to translators. In Russian and Ukrainian there are different words for "phylum" depending on whether they are plants or animals, so this would allow us to provide iconic_taxon as an inflection for translation keys like ranks.x_phyla that we use on the Lifelists in the Rails app, e.g. @iconic_taxon{Plantae:отдел|Fungi:отдел|Animalia:Тип|Aves:Тип|one Тип / отдел} (they would need to customize the rest of the animals too).

My main unknown is whether adding this join is a performance risk.

Copy link
Member

@pleary pleary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is OK to merge. We currently don't have an index on taxa.iconic_taxon_id, but the psql query optimizer seems to be leveraging caching to make the join more performant. We can keep an eye on performance of that endpoint after deploying this, and if we notice slowdowns I'd recommend we index that column. I think the only place we use that endpoint it in production is in lifelists

@kueda kueda merged commit 444364f into main Nov 3, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants