# Using Elasticsearch filter plugin to add information to a index

**URL:** <https://discuss.elastic.co/t/using-elasticsearch-filter-plugin-to-add-information-to-a-index/134314>\
**Category:** Logstash\
**Created:** [June 3, 2018, 12:42pm UTC](https://discuss.elastic.co/t/using-elasticsearch-filter-plugin-to-add-information-to-a-index/134314 "2018-06-03T12:42:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![espogian](https://avatars.discourse-cdn.com/v4/letter/e/4491bb/32.png) [@espogian](https://discuss.elastic.co/u/espogian)\
**Post date:** [June 3, 2018, 12:42pm UTC](https://discuss.elastic.co/t/using-elasticsearch-filter-plugin-to-add-information-to-a-index/134314/1 "2018-06-03T12:42:48Z")

</div>

Hi, I'm trying to use elasticsearch filter plugin to add some information to an index which I'm populating ingesting a CSV.  
The CSV is providing this kind of information:

```
id; value; date

```

And I want to add some other stuff from an already existent index (in this example, I will call it "logstash-example").  
So I'm using this filter:

```
elasticsearch {
    hosts => ["elasticsearch:9200"]
    index => ["logstash-example*"]
    query => "id:%{[id]}"
    fields => { "interesting_field" => "interesting_field" }
}

```

This is not working though, and I would like to understand why.  
What I would like this filter to do is to look in logstash-example\* for entries which field "id" is matching with that coming from the CSV, and then add a new field named "interesting\_field" to the index being populated by Logstash using the value of the same-named "interesting\_field" in logstash-example\*

Is that syntax correct?

Thank you

---

<div class="post-metadata">

**Author:** ![espogian](https://avatars.discourse-cdn.com/v4/letter/e/4491bb/32.png) [@espogian](https://discuss.elastic.co/u/espogian)\
**Post date:** [June 8, 2018, 6:25am UTC](https://discuss.elastic.co/t/using-elasticsearch-filter-plugin-to-add-information-to-a-index/134314/2 "2018-06-08T06:25:15Z")

</div>

At the end of the story, it was a typo. I apologize.

---

<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, 2018, 6:25am UTC](https://discuss.elastic.co/t/using-elasticsearch-filter-plugin-to-add-information-to-a-index/134314/3 "2018-07-06T06:25:21Z")

</div>

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