-
Notifications
You must be signed in to change notification settings - Fork 141
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
Support match_phrase filter function in SQL and PPL #604
Merged
joshuali925
merged 58 commits into
opensearch-project:main
from
Bit-Quill:integ-match_phrase-#185
May 25, 2022
Merged
Changes from 57 commits
Commits
Show all changes
58 commits
Select commit
Hold shift + click to select a range
e7c45f5
Support match_phrase in AST expressions
a39f423
Support match_phrase in PPL syntax
8d0cd91
Added MATCH_QUERY to the list of supported functions in SQL parser.
Yury-Fridlyand 7d451e5
Support slop parameter for relevancy functions
7001b87
Typo fix for previous commit. Expanded list of MATCH_* function argum…
Yury-Fridlyand f0ff81c
Integration tests for match_test in PPL
b883254
Support slop option
e1c071a
Tests to verify that PPL parser supports match_phrase
9d4f378
Refactor and style fixes
3c8bd62
Refactor and fix style in OpenSearchFunctions.java
4a0fe8b
Style fixes for OpenSearchFunctionsTest.java
659c4d7
Add tests for `MATCH` and `MATCH_PHRASE` functions.
Yury-Fridlyand 017fbb7
Typo fix.
Yury-Fridlyand e93aa2b
Fix style and minor refactor in PPLSyntaxParserTest.java
f67b1ac
Minor test improvements
Yury-Fridlyand 0e48992
Parameterized test for match_phrase parsing
cc2100b
Add `MATCH_PHRASE` function to the function repository.
Yury-Fridlyand 23f8fe6
Finally added `MATCH_PHASE` query support to `FilterQueryBuilder`.
Yury-Fridlyand 775cb20
Typo fix + EOL fix
Yury-Fridlyand 2aaf047
Typo fix
Yury-Fridlyand 2316173
Adding tests for `FilterQueryBuilder` for `MATCH_PHRASE`. Some tests …
Yury-Fridlyand e22879a
Address PR feedback.
Yury-Fridlyand a46d6ac
Add documentation for `MATCH_PHRASE` function.
Yury-Fridlyand 30ef3ba
Remove duplicate definition of match_phrase in DSL.java
39ac1dd
Generate supported signatures for match and match_phrases
0ec0aec
Simplify match_phrase test.
a987aa3
Some sample queries with match_phrase for parser test
14cb1a5
Update PPL documentation.
b4f5ba9
Update query samples in docs. Add a new table to doctest to match the…
Yury-Fridlyand e4d155b
Recover `FUZZY_REWRITE` - was deleted by mistake.
Yury-Fridlyand c303381
Add missing file for `63009a05`.
Yury-Fridlyand 5020d7f
Use constant seed to produce repeatable samples
82c6ab8
Enable integration tests for match_phrase in PPL
a0d56a8
Fix code style.
Yury-Fridlyand becdeac
Make generateAndTestQueries() product consistent results.
b30db7e
use generateQueries to generate samples for match_phrase
0e8d6da
Fix finction signature list. Typo fix for `5bf470c7`.
Yury-Fridlyand 4b92454
Fix code styling.
Yury-Fridlyand 5334c65
Minor style changes.
05c6acb
Add newline at the end of file.
80e3da0
Simplify MatchPhraseQuery and add unit tests.
8198323
Remove unused imports.
5c6e07f
Change data used by WhereCommandIT
0f7ea73
Style update for OpenSearchFunctions
026ac4c
100% test coverage for MatchPhraseQuery
e68ba62
Fix imports in WhereCommandIT
bcc0a82
Move final variables to class constants in OpenSearchFunctions
0127ee6
Fix checkstyle failure.
d6ea633
Support legacy syntax for match_phrase in the new SQL engine.
fedbbed
Merge pull request #59 from Bit-Quill/integ-match_phrase-#185-legacy-…
MaxKsyunz 1fae665
Added missed license headers.
d3667ce
Add RelevanceQuery -- a base class for MatchQuery and MatchPhraseQuery.
7101d07
Use SyntaxCheckException from RelevanceQuery.build
b5bf44e
MatchPhraseQueryBuilder constructor requires a non-empty field name.
17f0ded
Add missing newline at the end of the file.
80f0deb
Merge branch 'main' into integ-match_phrase-#185
MaxKsyunz 15775e8
Update tests from upstream/main to verify new behavior.
ee4e319
Verify exception messages in RelevanceQueryBuildTest
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{"id": 1, "author": "Alan Alexander Milne", "title": "The House at Pooh Corner"} | ||
{"id": 2, "author": "Alan Alexander Milne", "title": "Winnie-the-Pooh"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
not sure what should be done but should we distinguish between this one and https://github.com/opensearch-project/sql/blob/main/docs/user/beyond/fulltext.rst#match-phrase-query
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.
Is that
match_phrase
from the legacy SQL engine?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.
i believe so, i'm thinking maybe add a note to the old one, or link it after "For backward compatibility" in the new one, so users know what the difference is
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.
@joshuali925 that's a good point.
Distinction between old and new SQL engines was explicitly removed as part of #58
I'd like to add a note to
fulltext.rst
that the document describes the legacy SQL engine and to refer tofunctions.rst
for the new engine.Once the new engine is on par with the old one, we can update
fulltext.rst
to describe the default engine.What do you think?