Skip to content

Commit

Permalink
Added Implementation.
Browse files Browse the repository at this point in the history
Signed-off-by: GabeFernandez310 <[email protected]>
  • Loading branch information
GabeFernandez310 committed Nov 21, 2022
1 parent 5c48bb5 commit fbcee86
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ public enum BuiltinFunctionName {
SIMPLE_QUERY_STRING(FunctionName.of("simple_query_string")),
MATCH_PHRASE(FunctionName.of("match_phrase")),
MATCHPHRASE(FunctionName.of("matchphrase")),
MATCHPHRASEQUERY(FunctionName.of("matchphrasequery")),
QUERY_STRING(FunctionName.of("query_string")),
MATCH_BOOL_PREFIX(FunctionName.of("match_bool_prefix")),
HIGHLIGHT(FunctionName.of("highlight")),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public void register(BuiltinFunctionRepository repository) {
// compatibility.
repository.register(match_phrase(BuiltinFunctionName.MATCH_PHRASE));
repository.register(match_phrase(BuiltinFunctionName.MATCHPHRASE));
repository.register(match_phrase(BuiltinFunctionName.MATCHPHRASEQUERY));
repository.register(match_phrase_prefix());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public class FilterQueryBuilder extends ExpressionNodeVisitor<QueryBuilder, Obje
.put(BuiltinFunctionName.MATCH.getName(), new MatchQuery())
.put(BuiltinFunctionName.MATCH_PHRASE.getName(), new MatchPhraseQuery())
.put(BuiltinFunctionName.MATCHPHRASE.getName(), new MatchPhraseQuery())
.put(BuiltinFunctionName.MATCHPHRASEQUERY.getName(), new MatchPhraseQuery())
.put(BuiltinFunctionName.QUERY.getName(), new QueryQuery())
.put(BuiltinFunctionName.MATCH_QUERY.getName(), new MatchQuery())
.put(BuiltinFunctionName.MATCHQUERY.getName(), new MatchQuery())
Expand Down
1 change: 1 addition & 0 deletions sql/src/main/antlr/OpenSearchSQLLexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ INCLUDE: 'INCLUDE';
IN_TERMS: 'IN_TERMS';
MATCHPHRASE: 'MATCHPHRASE';
MATCH_PHRASE: 'MATCH_PHRASE';
MATCHPHRASEQUERY: 'MATCHPHRASEQUERY';
SIMPLE_QUERY_STRING: 'SIMPLE_QUERY_STRING';
QUERY_STRING: 'QUERY_STRING';
MATCH_PHRASE_PREFIX: 'MATCH_PHRASE_PREFIX';
Expand Down
2 changes: 1 addition & 1 deletion sql/src/main/antlr/OpenSearchSQLParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ systemFunctionName
;

singleFieldRelevanceFunctionName
: MATCH | MATCH_PHRASE | MATCHPHRASE
: MATCH | MATCH_PHRASE | MATCHPHRASE| MATCHPHRASEQUERY
| MATCH_BOOL_PREFIX | MATCH_PHRASE_PREFIX
;

Expand Down

0 comments on commit fbcee86

Please sign in to comment.