gbif / portal16

GBIF.org website
https://www.gbif.org
Apache License 2.0
24 stars 15 forks source link

GRSciColl - search on specific fields #1727

Open llivermore opened 2 years ago

llivermore commented 2 years ago

On the search page (https://www.gbif.org/grscicoll/institution/search?) querying for the string displayed for UK collections "United Kingdom of Great Britain and Northern Ireland" returns no results.

marcos-lg commented 2 years ago

I can see that in the portal if you search by United Kingdom in the country it displays "United Kingdom of Great Britain and Northern Ireland":

https://www.gbif.org/grscicoll/institution/search?q=United%20Kingdom&offset=0

But when you look at those institutions they just "United Kingdom" in the country field:

https://registry.gbif.org/institution/24702155-10cf-47cf-bd3f-4e030040c113

That's why they aren't returned in that query.

@MortenHofft shouldn't the portal display the same country as it is in the institution?

MortenHofft commented 2 years ago

The problem is that the API do not have an option to take translation of enumerations into account. For example the french site will show the french names. But searching by the french names will give no results as the API is english and further work with country codes. https://www.gbif.org/fr/grscicoll/institution/search?q=United%20Kingdom&offset=0

The only reason there are any results for "united kingdom" is because the description field includes those words.

We have these options as far as I can see:

I suspect we will opt for the latter when we rewrite this page at some point. When we adopted GrSciColl we only had free text search. Since then more options have been added to the API, but not the UI.

I'm going to leave this open as a feature request for structured search on specific fields (e.g. country, city etc)


@marcos-lg

@MortenHofft shouldn't the portal display the same country as it is in the institution?

The API returns a country code. The registry and gbif.org just use different translation files. Along the way someone has updated the translation for GBIF.org (the registry one is a stale copy of what we had in gbif.org 2 years ago)