Skip to content

Commit 987700f

Browse files
committed
address few final comments
- added `stack: ga 9.1.0` blocks to match_phrase.md and qstr.md examples - simplified term.md version from `preview 9.0.0` to just `preview` - added `applies_to = "stack: ga 9.1.0"` to matchphrase and querystring java annotations - removed version `9.0.0` from term function annotation - deleted unused `makeCallout()` and `appendLifeCycleAndVersion()` methods
1 parent 46bb433 commit 987700f

File tree

7 files changed

+12
-15
lines changed

7 files changed

+12
-15
lines changed

docs/reference/query-languages/esql/_snippets/functions/examples/match_phrase.md

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/examples/qstr.md

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/layout/term.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/MatchPhrase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public class MatchPhrase extends FullTextFunction implements OptionalArgument, P
107107
All [`match_phrase`](/reference/query-languages/query-dsl/query-dsl-match-query-phrase.md) query parameters are supported.
108108
109109
`MATCH_PHRASE` returns true if the provided query matches the row.""",
110-
examples = { @Example(file = "match-phrase-function", tag = "match-phrase-with-field") }
110+
examples = { @Example(file = "match-phrase-function", tag = "match-phrase-with-field", applies_to = "stack: ga 9.1.0") }
111111
)
112112
public MatchPhrase(
113113
Source source,

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/QueryString.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public class QueryString extends FullTextFunction implements OptionalArgument {
111111
+ "Returns true if the provided query string matches the row.",
112112
examples = {
113113
@Example(file = "qstr-function", tag = "qstr-with-field"),
114-
@Example(file = "qstr-function", tag = "qstr-with-options") }
114+
@Example(file = "qstr-function", tag = "qstr-with-options", applies_to = "stack: ga 9.1.0") }
115115
)
116116

117117
public QueryString(

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/Term.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public class Term extends FullTextFunction implements PostAnalysisPlanVerificati
5252
@FunctionInfo(
5353
returnType = "boolean",
5454
preview = true,
55-
appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.PREVIEW, version = "9.0.0") },
55+
appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.PREVIEW) },
5656
description = "Performs a Term query on the specified field. Returns true if the provided term matches the row.",
5757
examples = { @Example(file = "term-function", tag = "term-with-field") }
5858
)

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/DocsV3Support.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -592,17 +592,6 @@ private void renderFunctionNamedParams(EsqlFunctionRegistry.MapArgSignature mapA
592592
writeToTempSnippetsDir("functionNamedParams", rendered.toString());
593593
}
594594

595-
private String makeCallout(String type, String text) {
596-
return ":::{" + type + "}\n" + text.trim() + "\n:::\n";
597-
}
598-
599-
private void appendLifeCycleAndVersion(StringBuilder appliesToText, FunctionAppliesTo appliesTo) {
600-
appliesToText.append(appliesTo.lifeCycle().name().toLowerCase(Locale.ROOT));
601-
if (appliesTo.version().isEmpty() == false) {
602-
appliesToText.append(" ").append(appliesTo.version());
603-
}
604-
}
605-
606595
private String makeAppliesToText(FunctionAppliesTo[] functionAppliesTos, boolean preview) {
607596
StringBuilder appliesToText = new StringBuilder();
608597
if (functionAppliesTos.length > 0) {

0 commit comments

Comments
 (0)