Skip to content

Commit 1e6473a

Browse files
[DOCS][ESQL] Add versions to the docs for LIKE LIST (#130299)
Clarifies the version applicability for new LIKE function alternative syntax with a list of patterns, added in #129170
1 parent 5c8c001 commit 1e6473a

File tree

6 files changed

+27
-15
lines changed

6 files changed

+27
-15
lines changed

docs/reference/query-languages/esql/_snippets/operators/detailedDescription/like.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,24 @@ ROW message = "foo * bar"
1010
```
1111

1212

13+
To reduce the overhead of escaping, we suggest using triple quotes strings `"""`
14+
1315
```esql
14-
ROW message = "foobar"
15-
| WHERE message like ("foo*", "bar?")
16+
ROW message = "foo * bar"
17+
| WHERE message LIKE """foo \* bar"""
1618
```
1719

1820

19-
To reduce the overhead of escaping, we suggest using triple quotes strings `"""`
21+
```{applies_to}
22+
stack: ga 9.1
23+
serverless: ga
24+
```
25+
Both a single pattern or a list of patterns are supported. If a list of patterns is provided,
26+
the expression will return true if any of the patterns match.
2027

2128
```esql
22-
ROW message = "foo * bar"
23-
| WHERE message LIKE """foo \* bar"""
29+
ROW message = "foobar"
30+
| WHERE message like ("foo*", "bar?")
2431
```
2532

2633

docs/reference/query-languages/esql/kibana/definition/operators/like.json

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

docs/reference/query-languages/esql/kibana/definition/operators/not like.json

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

docs/reference/query-languages/esql/kibana/docs/operators/like.md

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

docs/reference/query-languages/esql/kibana/docs/operators/not like.md

Lines changed: 1 addition & 2 deletions
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/scalar/string/regex/WildcardLike.java

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ public class WildcardLike extends RegexMatch<WildcardPattern> {
3838
Use `LIKE` to filter data based on string patterns using wildcards. `LIKE`
3939
usually acts on a field placed on the left-hand side of the operator, but it can
4040
also act on a constant (literal) expression. The right-hand side of the operator
41-
represents the pattern or a list of patterns. If a list of patterns is provided,
42-
the expression will return true if any of the patterns match.
41+
represents the pattern.
4342
4443
The following wildcard characters are supported:
4544
@@ -51,11 +50,19 @@ also act on a constant (literal) expression. The right-hand side of the operator
5150
5251
<<load-esql-example, file=string tag=likeEscapingSingleQuotes>>
5352
54-
<<load-esql-example, file=where-like tag=likeListDocExample>>
55-
5653
To reduce the overhead of escaping, we suggest using triple quotes strings `\"\"\"`
5754
5855
<<load-esql-example, file=string tag=likeEscapingTripleQuotes>>
56+
57+
```{applies_to}
58+
stack: ga 9.1
59+
serverless: ga
60+
```
61+
Both a single pattern or a list of patterns are supported. If a list of patterns is provided,
62+
the expression will return true if any of the patterns match.
63+
64+
<<load-esql-example, file=where-like tag=likeListDocExample>>
65+
5966
""", operator = NAME, examples = @Example(file = "docs", tag = "like"))
6067
public WildcardLike(
6168
Source source,

0 commit comments

Comments
 (0)