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

Queries on aliased/provider fields are broken for nested properties #282

Closed
ml-evs opened this issue May 29, 2020 · 1 comment · Fixed by #285
Closed

Queries on aliased/provider fields are broken for nested properties #282

ml-evs opened this issue May 29, 2020 · 1 comment · Fixed by #285
Assignees
Labels
bug Something isn't working priority/high Issue or PR with a consensus of high priority server Issues pertaining to the example server implementation transformers Related to all filter transformers

Comments

@ml-evs
Copy link
Member

ml-evs commented May 29, 2020

If a user tries to filter against an implementation-specific field, they currently have to exclude the provider prefix. We should use the mappers to adjust filters on provider-specific properties so that the query is on the correct field.

e.g. https://optimade.odbx.science/v0/structures?filter=_odbx_dft_parameters.cut_off_energy=800 returns nothing,

and instead https://optimade.odbx.science/v0/structures?filter=dft_parameters.cut_off_energy=800 is required to get the expected result.

@ml-evs ml-evs added priority/medium Issue or PR with a consensus of medium priority transformers Related to all filter transformers server Issues pertaining to the example server implementation labels May 29, 2020
@ml-evs ml-evs changed the title Apply provider field map in filtertransformers Queries on provider fields are broken May 29, 2020
@ml-evs
Copy link
Member Author

ml-evs commented May 29, 2020

This problem looks like it applies to any aliased field, provider-specific or general OPTIMADE. Have any of you with databases that use the aliases run into this? (probably just @shyamd?)

@ml-evs ml-evs changed the title Queries on provider fields are broken Queries on aliased/provider fields are broken May 29, 2020
@ml-evs ml-evs added bug Something isn't working priority/high Issue or PR with a consensus of high priority and removed priority/medium Issue or PR with a consensus of medium priority labels May 29, 2020
@ml-evs ml-evs self-assigned this May 30, 2020
@ml-evs ml-evs changed the title Queries on aliased/provider fields are broken Queries on aliased/provider fields are broken for nested properties Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority/high Issue or PR with a consensus of high priority server Issues pertaining to the example server implementation transformers Related to all filter transformers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant