wmo-im / wis2-gdc

WIS2 Global Discovery Catalogue Reference Implementation
https://wis2-gdc.readthedocs.io
Apache License 2.0
3 stars 2 forks source link

Search for Metadata of an Organisation #25

Open antje-s opened 2 weeks ago

antje-s commented 2 weeks ago

It is currently possible to initiate a full-text search using the q parameter ("The optional q parameter supports keyword searching. Only records whose text fields contain one or more of the specified search terms are selected. The specific set of text keys/fields/properties of a record to which the q operator is applied is up to the description of the server. "), e.g.

https://wis2.dwd.de/gdc/collections/wis2-discovery-metadata/items?q=%22Government%20of%20Canada;%20Environment%20and%20Climate%20Change%20Canada;%20Meteorological%20Service%20of%20Canada%22

OR https://wis2.dwd.de/gdc/collections/wis2-discovery-metadata/items?q=%22Deutscher%20Wetterdienst%22

But is it ensured that the search string is used as a complete string by using the inverted commas? Currently, in the wis2-gdc implementation, the properties.contacts.organization field also seems to be indexed and used, but how can you query which fields are searched via q-parameter?

This use case probably occurs more frequently and a specific search only on the properties.contacts.organisation field (e.g. as query "term") could be useful. Or perhaps it is sufficient to request that this field is included for q parameter.

antje-s commented 2 weeks ago

The queryables /collections/wis2-discovery-metadata/queryables might be the fields searched by q parameter. Then the match for the example could be in description. A specific search for organization field would be useful in my opinion.

antje-s commented 2 weeks ago

One possibility seems to be a search via e.g. https://wis2.dwd.de/gdc/collections/wis2-discovery-metadata/items?f=json&q=((properties.contacts.organization:%22Direction+Generale+de+la+M%C3%A9t%C3%A9orologie%22)) Does such a search ensure that no search hits in other fields are also returned? From my point of view it should be like this. If yes, we could close this issue