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 · 2 comments
Open

keyword searching #26

antje-s opened this issue Nov 4, 2024 · 2 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).

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

3 participants