# Logstash elasticsearch filter plugin exact match

**URL:** <https://discuss.elastic.co/t/logstash-elasticsearch-filter-plugin-exact-match/136308>\
**Category:** Logstash\
**Created:** [June 18, 2018, 12:35pm UTC](https://discuss.elastic.co/t/logstash-elasticsearch-filter-plugin-exact-match/136308 "2018-06-18T12:35:22Z")\
**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 18, 2018, 12:35pm UTC](https://discuss.elastic.co/t/logstash-elasticsearch-filter-plugin-exact-match/136308/1 "2018-06-18T12:35:22Z")

</div>

Hi, I'm using elasticsearch filter plugin in a pipeline configuration like this:

```
elasticsearch {
	hosts => ["elasticsearch:9200"]
	index => ["logstash-indexname"]
	query => "item:%{[itemname]}"

```

The question is: how can I perform a query with an exact macth?

---

<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 19, 2018, 9:01am UTC](https://discuss.elastic.co/t/logstash-elasticsearch-filter-plugin-exact-match/136308/2 "2018-06-19T09:01:47Z")

</div>

To better detail the question (maybe I've been unclear) I need that query

query =\> "item:%{[itemname]}"

To be an exact one.  
For istance, if itemname is "foo", then I don't want the query to match foo-something in the index logstash-indexname.

Is it a matter of syntax or this is impossible to achieve?

---

<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 17, 2018, 9:02am UTC](https://discuss.elastic.co/t/logstash-elasticsearch-filter-plugin-exact-match/136308/3 "2018-07-17T09:02:02Z")

</div>

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