# Kibana KQL search saved with time range

**URL:** <https://discuss.elastic.co/t/kibana-kql-search-saved-with-time-range/295510>\
**Category:** Kibana\
**Tags:** kql-kibana-query-language\
**Created:** [January 26, 2022, 9:24pm UTC](https://discuss.elastic.co/t/kibana-kql-search-saved-with-time-range/295510 "2022-01-26T21:24:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JonathanCabral](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jonathancabral/32/100915_2.png) [@JonathanCabral](https://discuss.elastic.co/u/JonathanCabral)\
**Post date:** [January 26, 2022, 9:24pm UTC](https://discuss.elastic.co/t/kibana-kql-search-saved-with-time-range/295510/1 "2022-01-26T21:24:15Z")

</div>

Hi guys, my team are trying to do some search in kibana using KQL, but we are facing some problems. I hope you could help us.  
This question was Asked by my [teammate](https://discuss.elastic.co/u/pmerson/summary) on the [SO](https://stackoverflow.com/questions/69774294/kibana-kql-search-saved-with-time-range) quite a long, but had no answer.

I'm creating a saved _search_ using Kibana Discover. On screen I can select the time range manually (default is "Last 15 minutes"). If I select "Last 24 hours" and Refresh the search, it works fine. However, when I save the search, the time range information is not saved. Whenever I open Kibana Discover and open my saved search, the time range is always the default (last 15 minutes).

I tried adding different conditions (below) to my KQL query, to no avail. :^(

```auto
 and @timestamp >= "now-24h"
 and @timestamp >= now-24h
 and timestamp >= "now-24h"
 and @timestamp >= "now-1d/d"
 etc.

```

I also tried to "Add filter" using the `@timestamp` field. The only operators available are: `is not` , `is one of` , `is not one of` , `is between` , `is not between` , `exists` , `does not exist` .  
So, I tried `between` `now-24h` and `now` . Yet, no results match the criteria.

However, if I **manually** change the time range to say, Last 30 days, then my filter works!

![image](https://us1.discourse-cdn.com/elastic/original/3X/3/a/3aca7acc535aeb7a099e594227b6b6e5e0d72b49.png)

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [January 27, 2022, 12:59pm UTC](https://discuss.elastic.co/t/kibana-kql-search-saved-with-time-range/295510/2 "2022-01-27T12:59:34Z")

</div>

A [saved search](https://www.elastic.co/guide/en/kibana/current/save-open-search.html) does not persist the time range. There is an [open issue](https://github.com/elastic/kibana/issues/9761) you can follow for storing time in a search

Have you tried using a [saved query](https://www.elastic.co/guide/en/kibana/current/save-load-delete-query.html)? Saved queries allow for saving the time

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 24, 2022, 1:00pm UTC](https://discuss.elastic.co/t/kibana-kql-search-saved-with-time-range/295510/3 "2022-02-24T13:00:08Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
