# Logstash elasticsearch filter plugin

**URL:** <https://discuss.elastic.co/t/logstash-elasticsearch-filter-plugin/25803>\
**Category:** Logstash\
**Created:** [July 17, 2015, 12:53pm UTC](https://discuss.elastic.co/t/logstash-elasticsearch-filter-plugin/25803 "2015-07-17T12:53:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![juerkan](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@juerkan](https://discuss.elastic.co/u/juerkan)\
**Post date:** [July 17, 2015, 12:53pm UTC](https://discuss.elastic.co/t/logstash-elasticsearch-filter-plugin/25803/1 "2015-07-17T12:53:41Z")

</div>

Hi there,  
a new log comes in, and i query my Elasticsearch Cluster to find a match with an existing document:  
filter  
{  
if[type] == 'aaa' {  
elasticsearch {  
hosts =\> ["10.10.10.10"]  
query =\> "SYSTNO:%{message}"  
works fine, but  
Now i want copy from the existing ES document (with the match SYSTNO:message) another field to the new incoming log.  
fields =\> ["location", "newfield"]

(the fields SYSTNO and location are in the same existing document in the es-cluster)

But the the field "newfield" stays empty.?

Can somebody help me?

thx

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 18, 2015, 3:30am UTC](https://discuss.elastic.co/t/logstash-elasticsearch-filter-plugin/25803/2 "2015-07-18T03:30:56Z")

</div>

I'd check the document in ES to make sure that field is called what you want.

---

<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, 5:34am UTC](https://discuss.elastic.co/t/logstash-elasticsearch-filter-plugin/25803/3 "2017-07-06T05:34:18Z")

</div>


