mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[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
1 changed files with 24 additions and 2 deletions
|
@ -111,13 +111,35 @@ tags:(success and info and security)
|
|||
[discrete]
|
||||
=== Range queries
|
||||
|
||||
KQL supports `>`, `>=`, `<`, and `<=` on numeric and date types. For example:
|
||||
KQL supports `>`, `>=`, `<`, and `<=` on numeric and date types.
|
||||
|
||||
[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]
|
||||
=== Exist queries
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue