# Logstash input plugin "elasticsearch" to query only selective fields

**URL:** <https://discuss.elastic.co/t/logstash-input-plugin-elasticsearch-to-query-only-selective-fields/64470>\
**Category:** Logstash\
**Created:** [October 31, 2016, 5:25pm UTC](https://discuss.elastic.co/t/logstash-input-plugin-elasticsearch-to-query-only-selective-fields/64470 "2016-10-31T17:25:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![krlplm](https://avatars.discourse-cdn.com/v4/letter/k/9fc29f/32.png) [@krlplm](https://discuss.elastic.co/u/krlplm)\
**Post date:** [October 31, 2016, 5:25pm UTC](https://discuss.elastic.co/t/logstash-input-plugin-elasticsearch-to-query-only-selective-fields/64470/1 "2016-10-31T17:25:05Z")

</div>

Hi,

I am on Logstash 2.4 and trying to query only selective fields **["@timestamp", "user"]** from Elasticsearch 2.4 using the **input plugin "elasticsearch"**.

Using the search API for Elasticsearch, I could search for specific fields however using the elasticsearch input plugin, I could only figure out that the "query" either takes a value in a field for a **match** or **match\_all** which returns all possible matches.

What I am expecting is to see **all the values** for the fields **["@timestamp", "user"]** from the events so that I can further process them writing to the disk.

Could any one suggest the best way to deal with this please ?

Thanks

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [November 3, 2016, 6:34am UTC](https://discuss.elastic.co/t/logstash-input-plugin-elasticsearch-to-query-only-selective-fields/64470/2 "2016-11-03T06:34:08Z")

</div>

What does your configuration look like? What results are you getting? What results did you expect?

---

<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:** [July 6, 2017, 4:31am UTC](https://discuss.elastic.co/t/logstash-input-plugin-elasticsearch-to-query-only-selective-fields/64470/3 "2017-07-06T04:31:24Z")

</div>


