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

extend suggest with labels for parents #135

Closed
MortenHofft opened this issue May 27, 2024 · 1 comment
Closed

extend suggest with labels for parents #135

MortenHofft opened this issue May 27, 2024 · 1 comment
Assignees

Comments

@MortenHofft
Copy link
Member

From gbif/hosted-portals#289

In the registry I have to do 42 requests for a single keystroke on e.g. PreservationType
It isn't really something I want to do in a public facing product that should perform well. For that we probably need a backend that supports that kind of functionality.

ping @marcos-lg
Currently I can do https://api.gbif.org/v1/vocabularies/PreservationType/concepts/suggest?q=sto&locale=en-AR

that will return

[
  {
    "key": 1106,
    "name": "StorageOutdoors",
    "labels": []
  },
...
]

getting the label with fallback to english, as well as all the parent labels would make it more usable. Currently I would have to do an extra lookup for each result without a label, and secondly an additional lookup for each parent. And do so for all results. And so we end up with many requests per keystroke

@marcos-lg
Copy link
Contributor

Closed in favor of #140

marcos-lg added a commit that referenced this issue Jun 18, 2024
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

2 participants