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

Differentiate no results from invalid/unsupported filters #31

Open
merkys opened this issue Sep 6, 2021 · 7 comments
Open

Differentiate no results from invalid/unsupported filters #31

merkys opened this issue Sep 6, 2021 · 7 comments
Labels
enhancement New feature or request invalid This doesn't seem right question Further information is requested

Comments

@merkys
Copy link

merkys commented Sep 6, 2021

When searching for spacegroup="P1" on https://optimade.science, all providers but MPDS result in "No results". However, filter spacegroup="P1" is not defined in the OPTIMADE standard, thus it is nonstandard. Therefore, replies "No results" from other providers give false impressions that these databases do not contain P1 structures, which some of them do. Therefore I propose catching HTTP 4xx and 5xx from providers and reporting them as such.

@issuelabeler issuelabeler bot added the invalid This doesn't seem right label Sep 6, 2021
@blokhin
Copy link
Member

blokhin commented Sep 6, 2021

Accepted. I couldn't believe no other providers can handle such queries!

@blokhin
Copy link
Member

blokhin commented Sep 6, 2021

Do you know how exactly the spacegroups can be queried?

@blokhin blokhin added enhancement New feature or request question Further information is requested labels Sep 6, 2021
@merkys
Copy link
Author

merkys commented Sep 6, 2021

Do you know how exactly the spacegroups can be queried?

Currently, however, the specification does not have means to query spacegroups.

I can think of two methods to detect and report invalid/unsupported queries:

  1. Send the user-typed query to each provider and then inspect the HTTP return status. This method will allow individual providers to support nonstandard queries, just like MPDS supports spacegroup.
  2. Parse the query to immediately report invalid/unsupported (as per the specification) queries. This should be more difficult to implement, but would reduce the load on the providers.

@blokhin
Copy link
Member

blokhin commented Sep 6, 2021

Alright. I better remove the example with the spacegroup then. I expected this is fully valid example.

@merkys
Copy link
Author

merkys commented Sep 6, 2021

Alright. I better remove the example with the spacegroup then. I expected this is fully valid example.

It is not valid, indeed. Moreover, according to the specification, / symbols in filter strings must be percent-encoded. This is the reason why spacegroup= queries originating from https://optimade.science caught my eye in the first place. Probably percent-encoding issue should be better posted as a separate GitHub issue.

@blokhin
Copy link
Member

blokhin commented Oct 29, 2021

Closed by the 2.0.2 release of https://github.com/tilde-lab/optimade-client

@blokhin blokhin closed this as completed Oct 29, 2021
@blokhin
Copy link
Member

blokhin commented May 30, 2022

Re-opening wrt Materials-Consortia/OPTIMADE#405

@blokhin blokhin reopened this May 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request invalid This doesn't seem right question Further information is requested
Development

No branches or pull requests

2 participants