# Elastic filter plugin is not working

**URL:** <https://discuss.elastic.co/t/elastic-filter-plugin-is-not-working/110491>\
**Category:** Logstash\
**Created:** [December 6, 2017, 10:04am UTC](https://discuss.elastic.co/t/elastic-filter-plugin-is-not-working/110491 "2017-12-06T10:04:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sai\_Jana\_Selvakumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sai_jana_selvakumar/32/24884_2.png) [@Sai\_Jana\_Selvakumar](https://discuss.elastic.co/u/Sai_Jana_Selvakumar)\
**Post date:** [December 6, 2017, 10:04am UTC](https://discuss.elastic.co/t/elastic-filter-plugin-is-not-working/110491/1 "2017-12-06T10:04:29Z")

</div>

Config file:

input {  
http {  
host =\> "host"  
port =\> " port"

```
}

```

}

filter {

```
json {
		source => "message"
	}

```

ruby {  
code =\>"  
hash= {'id' =\> 'id' }"

}

elasticsearch {

```
hosts => ["host"]
index => "index_name"
query => 'some_field:"%{[id]}"'

```

}

```
mutate {
	remove_field => ["message","path","type","host", "entry","headers"]
}

```

}

Error:

:error=\>#\<Elasticsearch::Transport::Transport::Errors::BadRequest: [400] {"error":{"root\_cause":[{"type":"query\_shard\_exception","reason":"No mapping found for [@timestamp] in order to sort on","index\_uuid":"mjW6B3ljQjOydaexYmrcWA","index":"index\_name"}],"type":"search\_phase\_execution\_exception","reason":"all shards failed","phase":"query","grouped":true,"failed\_shards":[{"shard":0,"index":"index\_name","node":"0v0j-JY1QaWdd9IFmcqN\_Q","reason":{"type":"query\_shard\_exception","reason":"No mapping found for [@timestamp] in order to sort on","index\_uuid":"mjW6B3ljQjOydaexYmrcWA","index":"index\_name"}}]},"status":400}\>, :level=\>:warn}

---

<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:** [December 10, 2017, 9:06pm UTC](https://discuss.elastic.co/t/elastic-filter-plugin-is-not-working/110491/2 "2017-12-10T21:06:33Z")

</div>

The index you're searching doesn't have a `@timestamp` field. If you don't want the filter to sort on that field you need to adjust the `sort` option.

---

<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:** [January 7, 2018, 9:06pm UTC](https://discuss.elastic.co/t/elastic-filter-plugin-is-not-working/110491/3 "2018-01-07T21:06:52Z")

</div>

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