# Match name in Logstash Filter Elasticsearch plugin

**URL:** <https://discuss.elastic.co/t/match-name-in-logstash-filter-elasticsearch-plugin/122788>\
**Category:** Logstash\
**Created:** [March 6, 2018, 9:23pm UTC](https://discuss.elastic.co/t/match-name-in-logstash-filter-elasticsearch-plugin/122788 "2018-03-06T21:23:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajkamalkool6](https://avatars.discourse-cdn.com/v4/letter/r/e9c0ed/32.png) [@rajkamalkool6](https://discuss.elastic.co/u/rajkamalkool6)\
**Post date:** [March 6, 2018, 9:23pm UTC](https://discuss.elastic.co/t/match-name-in-logstash-filter-elasticsearch-plugin/122788/1 "2018-03-06T21:23:20Z")

</div>

I am using Logstash Elasticsearch filter to query matching data from `another index`. I am using below query

indexA : logstash-name  
fields: user

indexB: logstash-user  
fields: first\_name  
fields: type

```
  elasticsearch{
 		hosts => ["XX.XXX.XXX:9200"]
 		index => "logstash-user"
 		query => "type:user AND first_name.keyword:%{[user]}"
 		fields => { "first_name" => "first_name" }
    }

```

My query is not working as expected. It displaying data which is not matched at all shown in the below diagram. I am seeking inputs regarding the query I am using to fetch the data

**user**** first\_name**

![image](https://us1.discourse-cdn.com/elastic/original/3X/0/f/0fae8785fc5518024e37d77fbdb10ed7d23ba9a4.png)

---

<div class="post-metadata">

**Author:** ![rajkamalkool6](https://avatars.discourse-cdn.com/v4/letter/r/e9c0ed/32.png) [@rajkamalkool6](https://discuss.elastic.co/u/rajkamalkool6)\
**Post date:** [March 8, 2018, 9:55pm UTC](https://discuss.elastic.co/t/match-name-in-logstash-filter-elasticsearch-plugin/122788/2 "2018-03-08T21:55:33Z")

</div>

@magnusbaeck. Hi magnus do you have any insights on my above request?

---

<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 5, 2018, 9:55pm UTC](https://discuss.elastic.co/t/match-name-in-logstash-filter-elasticsearch-plugin/122788/3 "2018-04-05T21:55:37Z")

</div>

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