-
Notifications
You must be signed in to change notification settings - Fork 180
Make fields optional parameter in multi field relevance function. #4018
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
Make fields optional parameter in multi field relevance function. #4018
Conversation
9059c5a to
6bf78fa
Compare
98c52fa to
64b982b
Compare
Swiddis
left a comment
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.
Please add some docs (comments or otherwise) to explain how this works. I'm able to follow individual methods and I think I see an entrypoint, but I don't see how everything is linking together.
core/src/main/java/org/opensearch/sql/expression/function/udf/RelevanceQueryFunction.java
Show resolved
Hide resolved
...va/org/opensearch/sql/opensearch/storage/script/filter/lucene/relevance/MultiFieldQuery.java
Show resolved
Hide resolved
...opensearch/sql/opensearch/storage/script/filter/lucene/relevance/SimpleQueryStringQuery.java
Show resolved
Hide resolved
ppl/src/main/java/org/opensearch/sql/ppl/parser/AstExpressionBuilder.java
Show resolved
Hide resolved
64b982b to
9f80dbb
Compare
core/src/main/java/org/opensearch/sql/calcite/CalciteRexNodeVisitor.java
Outdated
Show resolved
Hide resolved
penghuo
left a comment
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.
@songkant-aws Please take a look.
ppl/src/main/java/org/opensearch/sql/ppl/parser/AstExpressionBuilder.java
Show resolved
Hide resolved
08795e3 to
eef1df5
Compare
|
The integ test failure is unrelated to this PR |
Signed-off-by: Vamsi Manohar <[email protected]>
eef1df5 to
6fd92bc
Compare
Signed-off-by: Vamsi Manohar <[email protected]> (cherry picked from commit 5c0ed0d) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…evance function. (#4093) * Make fields parameter optional in multi field relevance queries (#4018) Signed-off-by: Vamsi Manohar <[email protected]> (cherry picked from commit 5c0ed0d) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Fixed text block syntax issue for Java 11 Signed-off-by: Vamsi Manohar <[email protected]> --------- Signed-off-by: Vamsi Manohar <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Vamsi Manohar <[email protected]>
Description
This PR is the first step in making it easier to search in PPL. We want to support a simple "free text search" like the one described in this issue
The goal is to let you write a simple search like this:
search source = my_index "fatal error"And our system will automatically translate it to this behind the scenes:
search source = my_index | where simple_query_string("fatal error")Changes in this PR
To prepare for the new free text search, I'm updating how a few of our search functions work.
Now, you won't always have to provide a list of fields to search in. The
fieldsparameter is now optional for functions likesimple_query_stringandmulti_match.If you don't specify any fields, the query will automatically search the default fields set up for that index (specifically, in the
index.query.default_fieldsetting).Updated Documentation can be found here: PPL Relevance Functions
Check List
--signoff.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.