-
Notifications
You must be signed in to change notification settings - Fork 25.5k
[DOCS] ES|QL: Adding a tip to the WHERE documentation #114050
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
Conversation
Documentation preview: |
@KyleOnK8s please enable the option "Allow edits and access to secrets by maintainers" on your PR. For more information, see the documentation. |
Pinging @elastic/es-docs (Team:Docs) |
This option does not appear to exist for me. Docs team, please let me know if you need me to do something differently. |
Pinging @elastic/es-analytical-engine (Team:Analytics) |
Co-authored-by: Andrei Stefan <[email protected]>
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.
Just a nit to remove parenthesis :)
@astefan How far do we need to backport this?
@leemthompo Not sure about backporting. This is the default behavior of ES|QL since the beginning I think, it's nothing new imo. But it's good that we are explicit about this behavior, since ES itself behaves slightly different. |
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.
LGTM
Rephrasing for clarity Co-authored-by: Liam Thompson <[email protected]>
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.
🚢
* Adding a tip to make null field behavior more apparent. * Update docs/reference/esql/processing-commands/where.asciidoc Co-authored-by: Andrei Stefan <[email protected]> * Update docs/reference/esql/processing-commands/where.asciidoc Rephrasing for clarity Co-authored-by: Liam Thompson <[email protected]> --------- Co-authored-by: Andrei Stefan <[email protected]> Co-authored-by: Liam Thompson <[email protected]>
* Adding a tip to make null field behavior more apparent. * Update docs/reference/esql/processing-commands/where.asciidoc Co-authored-by: Andrei Stefan <[email protected]> * Update docs/reference/esql/processing-commands/where.asciidoc Rephrasing for clarity Co-authored-by: Liam Thompson <[email protected]> --------- Co-authored-by: Andrei Stefan <[email protected]> Co-authored-by: Liam Thompson <[email protected]>
* Adding a tip to make null field behavior more apparent. * Update docs/reference/esql/processing-commands/where.asciidoc Co-authored-by: Andrei Stefan <[email protected]> * Update docs/reference/esql/processing-commands/where.asciidoc Rephrasing for clarity Co-authored-by: Liam Thompson <[email protected]> --------- Co-authored-by: Andrei Stefan <[email protected]> Co-authored-by: Liam Thompson <[email protected]>
The
WHERE
clause in ES|QL will excludenull
results when using a!=
operator. Examples provided in screenshots. This is the opposite behavior from other query languages supported in Elastic. I tested KQL, Query DSL, and Lucene. I did not test any scripting languages.This can result in users accidentally excluding data they do not want to. This is especially concerning in Security applications where customers are building their rules to span multiple source types and those source types have mapping conflicts or other field disparity.
There is currently no information on this behavior in the ES|QL support docs. This PR is to address documentation.
No filters (for reference)

KQL

Lucene

Query DSL

ES|QL without filters (for reference)

ES|QL with NOT filter only (excludes the

null
result)ES|QL with NOT or IS NULL filter (includes the

null
result)