gbif / vocabulary

A simple registry of controlled vocabularies used for terms found in GBIF mediated data.
Apache License 2.0
5 stars 1 forks source link

extend suggest with labels for parents #135

Closed MortenHofft closed 4 weeks ago

MortenHofft commented 1 month ago

From https://github.com/gbif/hosted-portals/issues/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 commented 4 weeks ago

Closed in favor of https://github.com/gbif/vocabulary/issues/140