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

Enable dataset queries in EVE framework #366

Open
TomasKulhanek opened this issue May 22, 2019 · 1 comment
Open

Enable dataset queries in EVE framework #366

TomasKulhanek opened this issue May 22, 2019 · 1 comment
Assignees

Comments

@TomasKulhanek
Copy link
Contributor

TomasKulhanek commented May 22, 2019

Query for existing annotation related to dataset and dataset elements
This could be achieved by:

  1. Presuming [dataset_element_url] == [dataset url]/[dataset file]. Filtering annotation by target.source using regex to filter dataset url starting with specified string - dataset elements:
    https://b2note.bsc.es/api/annotations?where={%22target.source%22:{%22$regex%22:%20%22^https://trng-b2share.eudat.eu/api/files/44f3fc75-3f68-42c2-b537-ae0917ebcb44/.*%22}}

  2. Presuming dataset element annotation share same target.id. Filtering annotation by target.id - same value shared among dataset elements:
    https://b2note.bsc.es/api/annotations?where={%22target.id%22:%22http://hdl.handle.net/0000/810f3882fa0a4196aa9fd080de5f71c7%22}

@TomasKulhanek
Copy link
Contributor Author

TomasKulhanek commented May 22, 2019

$regex and filtering by target.id is disabled by default.
Query contains operators banned in MONGO_QUERY_BLACKLIST" - thus regex should be enabled in eve config https://docs.python-eve.org/en/stable/config.html
"filter on 'target.id' not allowed" - again needs to be enabled in eve config

After enabling filter and regex in query

  • Option 1 'target.source':{"$regex":"..."} returns all annotation where the source url string starts with dataset url
  • Option 2 'target.id':... seems not working - null is returned

@TomasKulhanek TomasKulhanek self-assigned this May 22, 2019
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

1 participant