# TimeLion Query for adding in a field from index

**URL:** https://discuss.elastic.co/t/timelion-query-for-adding-in-a-field-from-index/172138
**Category:** Kibana
**Tags:** timelion
**Created:** [March 13, 2019, 11:37am UTC](https://discuss.elastic.co/t/timelion-query-for-adding-in-a-field-from-index/172138 "2019-03-13T11:37:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ek9boy](https://avatars.discourse-cdn.com/v4/letter/e/50afbb/32.png) [@ek9boy](https://discuss.elastic.co/u/ek9boy)
#### Post date: [March 13, 2019, 11:37am UTC](https://discuss.elastic.co/t/timelion-query-for-adding-in-a-field-from-index/172138/1 "2019-03-13T11:37:28Z")

</div>

.es(index=logstash-Cat-res\_17\*).label('Count'),

I have the above query. i want to filter the results in Time Lion by Field\_ID = Exits (I can do this on on Kibana Visualizations by adding a simple filter on the graph. But how do i write this into the query for Time Lion

Thanks

---

<div class="post-metadata">

### Author: ![joshdover](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joshdover/32/42020_2.png) [@joshdover](https://discuss.elastic.co/u/joshdover)
#### Post date: [March 14, 2019, 8:41pm UTC](https://discuss.elastic.co/t/timelion-query-for-adding-in-a-field-from-index/172138/2 "2019-03-14T20:41:05Z")

</div>

You can use the `q` parameter in your `.es()` call to supply Lucene Query syntax. For example: `.es(index=logstash-Cat-res_17*, q='responseCode:200').label('Count')`

Just a tip, there's a "Help" button in the top right side of Timelion that shows documentation for each Timelion function and it's arguments. You can look in there for more info on each function.

Let me know if that doesn't work!

---

<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: [April 11, 2019, 8:41pm UTC](https://discuss.elastic.co/t/timelion-query-for-adding-in-a-field-from-index/172138/3 "2019-04-11T20:41:12Z")

</div>

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