# ES query is not working for realtime

**URL:** <https://discuss.elastic.co/t/es-query-is-not-working-for-realtime/176853>\
**Category:** Elasticsearch\
**Created:** [April 15, 2019, 7:52am UTC](https://discuss.elastic.co/t/es-query-is-not-working-for-realtime/176853 "2019-04-15T07:52:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wardakhan149](https://avatars.discourse-cdn.com/v4/letter/w/c4cdca/32.png) [@wardakhan149](https://discuss.elastic.co/u/wardakhan149)\
**Post date:** [April 15, 2019, 7:52am UTC](https://discuss.elastic.co/t/es-query-is-not-working-for-realtime/176853/1 "2019-04-15T07:52:40Z")

</div>

data: {  
url: {  
// %context%: true  
// %timefield%: timestamp  
// current voltage (bem\_ubdm) BEM\_UBDM  
// target voltage (bem\_ugensoll) BEM\_UGenSoll  
index: alias1

```
  body: {

  "_source": ["timestamp", "value", "vin", "dbcIdentifier"],
     "query": {
        "bool":{
          "must": [
              {"match": {"something": "something"}},
           {"range": {"timestamp": {"%timefilter%": true}}}
          ]
        }
    } }
}
format: {property: "hits.hits"}

```

}

i am using vega/vega-lite for data visualization in kibana. this is my ES qeury for fetching data. it is not getting data in real time. I am not sure about the time range, it would be really helpful if someone can pointou tmy mistake.

whenever i try to uncomment %context%: true & %timefield%: timestamp it says you cannot use the feature when you have the query set.  
please help guys ☹ i only want real time visualization

---

<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:** [May 13, 2019, 8:02am UTC](https://discuss.elastic.co/t/es-query-is-not-working-for-realtime/176853/2 "2019-05-13T08:02:14Z")

</div>

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