-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix permissive fields in relevance queries. #150
Fix permissive fields in relevance queries. #150
Conversation
Codecov Report
@@ Coverage Diff @@
## draft-integ-permissive-relevance-fields #150 +/- ##
==========================================================================
Coverage ? 94.99%
Complexity ? 3221
==========================================================================
Files ? 318
Lines ? 8715
Branches ? 640
==========================================================================
Hits ? 8279
Misses ? 382
Partials ? 54
Flags with carried forward coverage won't be shown. Click here to find out more. 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
core/src/main/java/org/opensearch/sql/analysis/ExpressionAnalyzer.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/opensearch/sql/analysis/ExpressionAnalyzer.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/opensearch/sql/analysis/ExpressionAnalyzer.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/opensearch/sql/analysis/ExpressionAnalyzer.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR re-implements the SingleFieldQuery
, MultiFieldQuery
, NoFieldQuery
class structure.
I'm checking to see if this can be implemented in those classes.
Field validation does not have to happen at analyze stage -- it can happen later. Relevance function parameters are a good example of this.
@forestmvey how are wildcards be treated? For a query like |
Signed-off-by: forestmvey <[email protected]>
c2d2643
to
b6a6add
Compare
I implemented that wildcard will not verify for valid fields, but will simply return OS results. So in the event of no fields beginning with |
Good point! It would be good to not add another class if possible. |
Signed-off-by: forestmvey <[email protected]>
Signed-off-by: forestmvey <[email protected]>
Signed-off-by: forestmvey [email protected]
Description
Relevance functions that query a field should act similar to how a
SELECT
query works. If a field is queried that does not exist, aSemanticCheckException
should be thrown.Issues Resolved
Issue: 613
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.