-
Notifications
You must be signed in to change notification settings - Fork 12
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
[BUG] Query parsing discrepancies lead to runtime failures #574
Comments
Some OSD references that may solve the issue: |
Another example of a discrepancy: If Example:
is translated into
which is what is actually received by the search pipelines. |
Created opensearch-project/OpenSearch#17358 for further tracking. |
In the meantime, we should do regex checks on the UI and update where we can detect paths defined on the non-expanded forms of different queries. I've done a deep check on all query types and how they are changed/translated when reaching the search request processors:
|
An issue on multi-character substrings with the suffix added was causing bugs. Fixed by refactoring the regex in #649 |
There are some discrepancies between some input query, and the final input query received by search request processors at runtime. This is due to the internal query construction done in OpenSearch.
Example:
User writes below query:
which internally gets converted to
which is also a valid query, and what is finally read by the processor.
So, writing some transform like
query.term.my_field
will fail, as it actually needs to bequery.term.my_field.value
. It will succeed on the UI (since UI only has access to the initial query), but fail at runtime, with something like the following:There may be other examples / edge cases that can trigger the same unexpected failures. Further investigation is needed on how/when the query gets parsed & transformed. If it is possible to fetch the transformed query on the UI, then we can display it somewhere, and use it as the input JSON to the search request processors to prevent the errors.
If not, at the least, adding some regex checking to proactively provide some dynamic warning messages may help.
The text was updated successfully, but these errors were encountered: