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

Add MatchPhraseQuery As Alternate Syntax for Match_Phrase Function #1103

Conversation

GabeFernandez310
Copy link
Contributor

Description

Adds matchphrasequery as alternate syntax for match_phrase function which currently exists in opensearch

Queries can be performed using the following syntax :

matchphrasequery(field, 'query')

Example:

SELECT field FROM index WHERE matchphrasequery(field, 'query');

This query should return the same result as match_phrase(field, 'query')

Issues Resolved

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --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.

GabeFernandez310 and others added 4 commits November 21, 2022 08:12
Signed-off-by: GabeFernandez310 <gabrielf@bitquilltech.com>
Signed-off-by: GabeFernandez310 <gabrielf@bitquilltech.com>
Signed-off-by: GabeFernandez310 <gabrielf@bitquilltech.com>
…hphrase-function

Add MatchPhraseQuery As Alternate Syntax for Match_Phrase Function
@GabeFernandez310 GabeFernandez310 requested a review from a team as a code owner November 24, 2022 17:39
@codecov-commenter
Copy link

codecov-commenter commented Nov 24, 2022

Codecov Report

Merging #1103 (3a96e0b) into 2.x (e2bf254) will decrease coverage by 2.51%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##                2.x    #1103      +/-   ##
============================================
- Coverage     98.29%   95.78%   -2.52%     
  Complexity     3465     3465              
============================================
  Files           347      357      +10     
  Lines          8647     9307     +660     
  Branches        550      669     +119     
============================================
+ Hits           8500     8915     +415     
- Misses          142      334     +192     
- Partials          5       58      +53     
Flag Coverage Δ
query-workbench 62.76% <ø> (?)
sql-engine 98.30% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...arch/storage/script/filter/FilterQueryBuilder.java 100.00% <ø> (ø)
...h/sql/expression/function/BuiltinFunctionName.java 100.00% <100.00%> (ø)
...h/sql/expression/function/OpenSearchFunctions.java 100.00% <100.00%> (ø)
...ublic/components/QueryResults/QueryResultsBody.tsx 68.32% <0.00%> (ø)
workbench/public/components/SQLPage/SQLPage.tsx 100.00% <0.00%> (ø)
workbench/public/components/Main/main.tsx 53.00% <0.00%> (ø)
...h/public/components/QueryLanguageSwitch/Switch.tsx 85.71% <0.00%> (ø)
workbench/public/components/Header/Header.tsx 100.00% <0.00%> (ø)
workbench/public/components/PPLPage/PPLPage.tsx 56.52% <0.00%> (ø)
...ch/public/components/QueryResults/QueryResults.tsx 61.60% <0.00%> (ø)
... and 3 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Yury-Fridlyand
Yury-Fridlyand previously approved these changes Nov 24, 2022
MaxKsyunz
MaxKsyunz previously approved these changes Nov 25, 2022
Signed-off-by: GabeFernandez310 <gabrielf@bitquilltech.com>
Copy link
Collaborator

@dai-chen dai-chen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes!

@dai-chen dai-chen merged commit 1287e89 into opensearch-project:2.x Dec 1, 2022
@dai-chen dai-chen added the enhancement New feature or request label Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants