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

Validate search string syntax #1191

Open
1 task
agbeltran opened this issue Mar 31, 2022 · 1 comment
Open
1 task

Validate search string syntax #1191

agbeltran opened this issue Mar 31, 2022 · 1 comment
Labels
datagateway-search Issues relating to the search plugin requires discussion

Comments

@agbeltran
Copy link
Member

Description:
Some search strings will give a syntax error, so I was wondering if we can have more checks to validate the search string and perhaps even include suggestions on how to improve it.

E.g the search string

CAL_IMAT_12/10/2017 16:05:49

is not valid and the appropriate search can be done by adding quotes:

"CAL_IMAT_12/10/2017 16:05:49"

finding the specific investigation correctly.

Acceptance criteria:

  • Investigate what improvements we can make to validate the search string and suggest alternative strings
@agbeltran agbeltran added datagateway-search Issues relating to the search plugin requires discussion labels Mar 31, 2022
@patrick-austin
Copy link
Contributor

As part of the wider changes to Lucene, the backend should throw errors specific to bad syntax. #1363 also has some suggestions on how to make the search help more explicit on what special characters cause the problems. Fundamentally the supported syntax is determined by https://lucene.apache.org/core/8_6_0/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#package_description and this is linked from the help text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datagateway-search Issues relating to the search plugin requires discussion
Projects
None yet
Development

No branches or pull requests

2 participants