# Granted documents query with filter by @timestamp

**URL:** <https://discuss.elastic.co/t/granted-documents-query-with-filter-by-timestamp/201834>\
**Category:** Elasticsearch\
**Created:** [October 1, 2019, 3:27pm UTC](https://discuss.elastic.co/t/granted-documents-query-with-filter-by-timestamp/201834 "2019-10-01T15:27:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anton\_Matveev](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anton_matveev/32/55204_2.png) [@Anton\_Matveev](https://discuss.elastic.co/u/Anton_Matveev)\
**Post date:** [October 1, 2019, 3:27pm UTC](https://discuss.elastic.co/t/granted-documents-query-with-filter-by-timestamp/201834/1 "2019-10-01T15:27:30Z")

</div>

I have a similar issue with granted documents query (as [Document Level Security & Combining queries together](https://discuss.elastic.co/t/document-level-security-combining-queries-together/136143))

I use following query:

```
{
    "bool": {
      "filter": [
        {
          "range": {
            "@timestamp": {
              "gte": "now-90d"
            }
          }
        }
      ]
    }
}

```

and on `Descover` tab I see an error `Error: Request to Elasticsearch failed: {"error":{"root_cause":[{"type":"parse_exception","reason":"could not read the current timestamp"}`

How I can use range by `@timestamp` in granted documents query?

Thanks.

---

<div class="post-metadata">

**Author:** ![alexus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexus/32/12696_2.png) [@alexus](https://discuss.elastic.co/u/alexus)\
**Post date:** [October 2, 2019, 5:40pm UTC](https://discuss.elastic.co/t/granted-documents-query-with-filter-by-timestamp/201834/2 "2019-10-02T17:40:17Z")

</div>

@Anton_Matveev

I appreciate you're tagging my topic, I must have missed @ikakavas [reply](https://discuss.elastic.co/t/document-level-security-combining-queries-together/136143/2) 😴 which wasn't formatting error as json was valid.

---

<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:** [October 30, 2019, 5:40pm UTC](https://discuss.elastic.co/t/granted-documents-query-with-filter-by-timestamp/201834/3 "2019-10-30T17:40:34Z")

</div>

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