[DOCS] Adds examples of date range queries (#88201)
* [DOCS] Adds examples of date range queries * Update docs/discover/kuery.asciidoc Co-authored-by: Nicholas Bellerophon <github@nerophon.com> Co-authored-by: Nicholas Bellerophon <github@nerophon.com>
This commit is contained in:
parent
64275cd11a
commit
b181f05141
|
@ -111,13 +111,35 @@ tags:(success and info and security)
|
||||||
[discrete]
|
[discrete]
|
||||||
=== Range queries
|
=== Range queries
|
||||||
|
|
||||||
KQL supports `>`, `>=`, `<`, and `<=` on numeric and date types. For example:
|
KQL supports `>`, `>=`, `<`, and `<=` on numeric and date types.
|
||||||
|
|
||||||
[source,yaml]
|
[source,yaml]
|
||||||
-------------------
|
-------------------
|
||||||
account_number >= 100 and items_sold <= 200 and @timestamp >= now-5m
|
account_number >= 100 and items_sold <= 200
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
|
[discrete]
|
||||||
|
=== Date range queries
|
||||||
|
|
||||||
|
Typically, Kibana's <<set-time-filter,time filter>> is sufficient for setting a time range,
|
||||||
|
but in some cases you might need to search on dates. Include the date range in quotes.
|
||||||
|
|
||||||
|
[source,yaml]
|
||||||
|
-------------------
|
||||||
|
@timestamp < "2021-01-02T21:55:59"
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
[source,yaml]
|
||||||
|
-------------------
|
||||||
|
@timestamp < "2021-01"
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
[source,yaml]
|
||||||
|
-------------------
|
||||||
|
@timestamp < "2021"
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
|
||||||
[discrete]
|
[discrete]
|
||||||
=== Exist queries
|
=== Exist queries
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue