-
Notifications
You must be signed in to change notification settings - Fork 25.6k
ESQL - match operator included in non-snapshot builds #116819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
6b3d019
9425de5
78998e7
084b4ed
fe147f3
a1e799a
019312f
733e7bd
6a32cea
c350403
881d59c
9731ea4
af0b035
83b0c9a
22f4388
68907ff
cdf896c
84fb7ee
673e5d9
cf80243
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 116819 | ||
summary: ESQL - Add match operator (:) | ||
area: Search | ||
type: feature | ||
issues: [] |
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.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[discrete] | ||
[[esql-search-operators]] | ||
=== Search operators | ||
|
||
The only search operator is match (`:`). | ||
|
||
preview::["Do not use on production environments. This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features."] | ||
|
||
The match operator performs a <<query-dsl-match-query,match query>> on the specified field. Returns true if the provided query matches the row. | ||
|
||
[.text-center] | ||
image::esql/functions/signature/match_operator.svg[Embedded,opts=inline] | ||
|
||
include::types/match.asciidoc[] | ||
|
||
[source.merge.styled,esql] | ||
---- | ||
include::{esql-specs}/match-operator.csv-spec[tag=match-with-field] | ||
---- | ||
[%header.monospaced.styled,format=dsv,separator=|] | ||
|=== | ||
include::{esql-specs}/match-operator.csv-spec[tag=match-with-field-result] | ||
|=== |
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.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will be nice to include an example of the match operator here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for doing that it would be needed to add a new
MatchOperator
class with the corresponding@FunctionInfo
annotation that contains the examples, so they are auto-generated and can be linked.We could create that class just for doc purposes and avoid instantiating it, or make it subclass
Match
- it could even be used to represent the operator instead of usingMatch
for both the function and the operator.WDYT?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
search.asciidoc
is not a generated file, we can just add an example of match operator manually without adding a new class.in.asciidoc
has an example of including a csvtest there. Perhaps just pick one example with tag frommatch-operator.csv-spec
and add it here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I didn't know we could add CSV tests directly without generating the examples via tests. Thanks!
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added an example in 22f4388, now search operators looks like: