[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
This commit is contained in:
Julian Kiryakov 2025-07-01 09:22:33 -04:00 committed by GitHub
parent 5c8c001c58
commit 1e6473a427
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 28 additions and 16 deletions

View File

@ -10,12 +10,6 @@ ROW message = "foo * bar"
```
```esql
ROW message = "foobar"
| WHERE message like ("foo*", "bar?")
```
To reduce the overhead of escaping, we suggest using triple quotes strings `"""`
```esql
@ -24,3 +18,16 @@ ROW message = "foo * bar"
```
```{applies_to}
stack: ga 9.1
serverless: ga
```
Both a single pattern or a list of patterns are supported. If a list of patterns is provided,
the expression will return true if any of the patterns match.
```esql
ROW message = "foobar"
| WHERE message like ("foo*", "bar?")
```

View File

@ -3,7 +3,7 @@
"type" : "operator",
"operator" : "LIKE",
"name" : "like",
"description" : "Use `LIKE` to filter data based on string patterns using wildcards. `LIKE`\nusually acts on a field placed on the left-hand side of the operator, but it can\nalso act on a constant (literal) expression. The right-hand side of the operator\nrepresents the pattern or a list of patterns. If a list of patterns is provided,\nthe expression will return true if any of the patterns match.\n\nThe following wildcard characters are supported:\n\n* `*` matches zero or more characters.\n* `?` matches one character.",
"description" : "Use `LIKE` to filter data based on string patterns using wildcards. `LIKE`\nusually acts on a field placed on the left-hand side of the operator, but it can\nalso act on a constant (literal) expression. The right-hand side of the operator\nrepresents the pattern.\n\nThe following wildcard characters are supported:\n\n* `*` matches zero or more characters.\n* `?` matches one character.",
"signatures" : [
{
"params" : [

View File

@ -3,7 +3,7 @@
"type" : "operator",
"operator" : "not like",
"name" : "not_like",
"description" : "Use `LIKE` to filter data based on string patterns using wildcards. `LIKE`\nusually acts on a field placed on the left-hand side of the operator, but it can\nalso act on a constant (literal) expression. The right-hand side of the operator\nrepresents the pattern or a list of patterns. If a list of patterns is provided,\nthe expression will return true if any of the patterns match.\n\nThe following wildcard characters are supported:\n\n* `*` matches zero or more characters.\n* `?` matches one character.",
"description" : "Use `LIKE` to filter data based on string patterns using wildcards. `LIKE`\nusually acts on a field placed on the left-hand side of the operator, but it can\nalso act on a constant (literal) expression. The right-hand side of the operator\nrepresents the pattern.\n\nThe following wildcard characters are supported:\n\n* `*` matches zero or more characters.\n* `?` matches one character.",
"signatures" : [
{
"params" : [

View File

@ -4,8 +4,7 @@
Use `LIKE` to filter data based on string patterns using wildcards. `LIKE`
usually acts on a field placed on the left-hand side of the operator, but it can
also act on a constant (literal) expression. The right-hand side of the operator
represents the pattern or a list of patterns. If a list of patterns is provided,
the expression will return true if any of the patterns match.
represents the pattern.
The following wildcard characters are supported:

View File

@ -4,8 +4,7 @@
Use `LIKE` to filter data based on string patterns using wildcards. `LIKE`
usually acts on a field placed on the left-hand side of the operator, but it can
also act on a constant (literal) expression. The right-hand side of the operator
represents the pattern or a list of patterns. If a list of patterns is provided,
the expression will return true if any of the patterns match.
represents the pattern.
The following wildcard characters are supported:

View File

@ -38,8 +38,7 @@ public class WildcardLike extends RegexMatch<WildcardPattern> {
Use `LIKE` to filter data based on string patterns using wildcards. `LIKE`
usually acts on a field placed on the left-hand side of the operator, but it can
also act on a constant (literal) expression. The right-hand side of the operator
represents the pattern or a list of patterns. If a list of patterns is provided,
the expression will return true if any of the patterns match.
represents the pattern.
The following wildcard characters are supported:
@ -51,11 +50,19 @@ public class WildcardLike extends RegexMatch<WildcardPattern> {
<<load-esql-example, file=string tag=likeEscapingSingleQuotes>>
<<load-esql-example, file=where-like tag=likeListDocExample>>
To reduce the overhead of escaping, we suggest using triple quotes strings `\"\"\"`
<<load-esql-example, file=string tag=likeEscapingTripleQuotes>>
```{applies_to}
stack: ga 9.1
serverless: ga
```
Both a single pattern or a list of patterns are supported. If a list of patterns is provided,
the expression will return true if any of the patterns match.
<<load-esql-example, file=where-like tag=likeListDocExample>>
""", operator = NAME, examples = @Example(file = "docs", tag = "like"))
public WildcardLike(
Source source,