My data has multiple date fields so I would like to get the start and end dates from the datepicker to use in a KQL query to further filter my data in a Kibana visualisation.
My index pattern uses admissionDate as the time field, so the datepicker will filter all patients admitted between the start and end date. But I want to filter patients who have also been discharged before the end date.
I can do this in Vega using the timefilter like this
%timefilter%: max
Is there a way to do this in KQL, something like this?
No, this is not currently supported. You can use regular datemath in KQL, so for example you can do date > now-7d/d to find all documents within the last 7 days rounded to midnight.
Then I created an index pattern for each alias, and each one has a different time field. So I can use the same index and filter by a different time field by selecting a different index pattern.
It doesn't get around the problem of using the same datepicker for 2 dates, but it solves some other problems.
If anyone has any better ideas, feel free to drop them here.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.