# What's the Lucene equivalent of KQL query: now/d

**URL:** <https://discuss.elastic.co/t/whats-the-lucene-equivalent-of-kql-query-now-d/316230>\
**Category:** Kibana\
**Created:** [October 10, 2022, 1:37pm UTC](https://discuss.elastic.co/t/whats-the-lucene-equivalent-of-kql-query-now-d/316230 "2022-10-10T13:37:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ykara84](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ykara84/32/106391_2.png) [@ykara84](https://discuss.elastic.co/u/ykara84)\
**Post date:** [October 10, 2022, 1:37pm UTC](https://discuss.elastic.co/t/whats-the-lucene-equivalent-of-kql-query-now-d/316230/1 "2022-10-10T13:37:03Z")

</div>

Hi

I'm trying to filter my data based on a date field to show me everything for today, in Kibana I can use the KQL query using **now/d** but I need the equivalent for Lucene, any help? I wouldve thought it'd be the same but it doesnt seem to work

---

<div class="post-metadata">

**Author:** ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)\
**Post date:** [October 10, 2022, 4:20pm UTC](https://discuss.elastic.co/t/whats-the-lucene-equivalent-of-kql-query-now-d/316230/2 "2022-10-10T16:20:50Z")

</div>

Hi @ykara84

welcome back to the Kibana community.  
Based on [this answer](https://discuss.elastic.co/t/lucene-query-language-using-now-date-time/275579) I think you could have something like: `my_field: [now/d TO *]`

---

<div class="post-metadata">

**Author:** ![ykara84](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ykara84/32/106391_2.png) [@ykara84](https://discuss.elastic.co/u/ykara84)\
**Post date:** [October 12, 2022, 10:41am UTC](https://discuss.elastic.co/t/whats-the-lucene-equivalent-of-kql-query-now-d/316230/3 "2022-10-12T10:41:04Z")

</div>

> [@Marco\_Liberati](#):
>
> [now/d TO \*]

doesnt seem to work:

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

---

<div class="post-metadata">

**Author:** ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)\
**Post date:** [October 12, 2022, 10:58am UTC](https://discuss.elastic.co/t/whats-the-lucene-equivalent-of-kql-query-now-d/316230/4 "2022-10-12T10:58:21Z")

</div>

That is because the query left an open range on the right. Limiting that to `now/d` will fix the range to a single day: `my_field: [now/d TO now/d]`

---

<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:** [November 9, 2022, 10:58am UTC](https://discuss.elastic.co/t/whats-the-lucene-equivalent-of-kql-query-now-d/316230/5 "2022-11-09T10:58:46Z")

</div>

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