Skip to content
5 changes: 5 additions & 0 deletions docs/changelog/127661.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 127661
summary: Add MATCH_PHRASE
area: ES|QL
type: enhancement
issues: []
5 changes: 5 additions & 0 deletions docs/changelog/128925.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 128925
summary: ES|QL - Add `match_phrase` full text function (tech preview)
area: ES|QL
type: enhancement
issues: []

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions docs/reference/esql/functions/examples/match_phrase.asciidoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

63 changes: 63 additions & 0 deletions docs/reference/esql/functions/kibana/definition/match_phrase.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions docs/reference/esql/functions/kibana/docs/match_phrase.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions docs/reference/esql/functions/layout/match_phrase.asciidoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions docs/reference/esql/functions/parameters/match_phrase.asciidoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/reference/esql/functions/signature/match_phrase.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions docs/reference/esql/functions/types/match_phrase.asciidoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ public MatchPhraseQueryBuilder zeroTermsQuery(ZeroTermsQueryOption zeroTermsQuer
return this;
}

public MatchPhraseQueryBuilder zeroTermsQuery(String zeroTermsQueryString) {
ZeroTermsQueryOption zeroTermsQueryOption = ZeroTermsQueryOption.readFromString(zeroTermsQueryString);
return zeroTermsQuery(zeroTermsQueryOption);
}

public ZeroTermsQueryOption zeroTermsQuery() {
return this.zeroTermsQuery;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ public static ZeroTermsQueryOption readFromStream(StreamInput in) throws IOExcep
throw new ElasticsearchException("unknown serialized type [" + ord + "]");
}

public static ZeroTermsQueryOption readFromString(String input) {
for (ZeroTermsQueryOption zeroTermsQuery : ZeroTermsQueryOption.values()) {
if (zeroTermsQuery.name().equalsIgnoreCase(input)) {
return zeroTermsQuery;
}
}
throw new ElasticsearchException("unknown serialized type [" + input + "]");
}

@Override
public void writeTo(StreamOutput out) throws IOException {
out.writeVInt(this.ordinal);
Expand Down
Loading