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

keyword searching #26

Open
antje-s opened this issue Nov 4, 2024 · 6 comments
Open

keyword searching #26

antje-s opened this issue Nov 4, 2024 · 6 comments

Comments

@antje-s
Copy link

antje-s commented Nov 4, 2024

In the keyword search it is apparently possible to search for several keyword values, whereby the default operator ‘AND’ seems to be used, e.g.

  1. prediction
    https://wis2.dwd.de/gdc/collections/wis2-discovery-metadata/items?f=json&limit=200&keywords=prediction
    --> numberMatched = 58
  2. prediction,global
    https://wis2.dwd.de/gdc/collections/wis2-discovery-metadata/items?f=json&limit=200&keywords=prediction,global
    --> numberMatched = 34
  3. prediction,global,"Weather and Climate"
    https://wis2.dwd.de/gdc/collections/wis2-discovery-metadata/items?f=json&limit=200&keywords=prediction,global,%22Weather%20and%20Climate%22
    --> numberMatched = 29

It seems to be possible to change the operator to OR, e.g. via
https://wis2.dwd.de/gdc/collections/wis2-discovery-metadata/items?f=json&limit=200&q=(keywords:prediction%20global)
--> numberMatched = 96

Does this behaviour apply in principle?

@kaiwirt
Copy link

kaiwirt commented Dec 17, 2024

Push :-)

@tomkralidis
Copy link
Collaborator

Does this behaviour apply in principle?

Similar to #25, for single term equality queries, I would suggest a "safer" way to query with:

https://wis2.dwd.de/gdc/collections/wis2-discovery-metadata/items?f=json&limit=200&keywords=prediction%20global

For compound queries with specific syntaxes such as AND OR NOT, etc., I would delegate to your examples of q per above. These examples are also in the WIS2 Cookbook (please feel free to suggest more examples there as well).

@kaiwirt
Copy link

kaiwirt commented Jan 20, 2025

A search for
https://wis2.dwd.de/gdc/collections/wis2-discovery-metadata/items?f=json&limit=200&keywords=%22Quantity%20of%20precipitation%22|%22Analysis%22
returns these
"keywords":[
"Historical",
"Archive",
"Hydrology",
"Hydrometric",
"Streamflow",
"Discharge",
"Water level",
"Water quantity",
"Water quantity",
"Sediment concentration",
"Water",
"National (CA)",
"Observation",
"Measurement"
],
What would be the best way to search for "Quantity of precipitation" OR "Analysis"
What we would like to have is a search for the exact terms (in ") combined with OR

@tomkralidis
Copy link
Collaborator

@joergklausen
Copy link

It's the example "Quantity of precipitation" that triggers me here (admittedly, a bit out of context): Please try to support a more unified vocabulary approach based on the WMO/WIGOS code lists, which in this case, would use "Amount of precipitation".

@tomkralidis
Copy link
Collaborator

Thanks @joergklausen. WCMP2's properties.keywords is designed to be free form keywords and does not have to align to any controlled vocabulary (1).

WCMP2 provides themes.concepts, allowing for 1..n concepts qualified by a scheme or register/dictionary) (2). Having said this, in WCMP2 we do need to add further checks/KPIs to ensure validation of these terms against their respective CVs.

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

4 participants