# Elastic search filter plugin is not working

**URL:** https://discuss.elastic.co/t/elastic-search-filter-plugin-is-not-working/113013
**Category:** Logstash
**Created:** [December 22, 2017, 2:14pm UTC](https://discuss.elastic.co/t/elastic-search-filter-plugin-is-not-working/113013 "2017-12-22T14:14:09Z")
**Posts on this page:** 2
**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 22, 2017, 2:14pm UTC](https://discuss.elastic.co/t/elastic-search-filter-plugin-is-not-working/113013/1 "2017-12-22T14:14:09Z")

</div>

```
input {
	http {
		host => "####" # default: 0.0.0.0
    		port => # # ##default: 8080

  	}
}

filter {

  	json {
    		source => "message"
		#remove_field => ["message","path","type","host"]
		}

ruby {
    	  code =>"
			#hash= {'id' => 'id' }
			chumma_id=event.get('[id]')
			event.set('delete_id',chumma_id)
"
}

     elasticsearch {
          		hosts => ["####"]
          		query => 'id:%{delete_id}'
          		fields => ["author_name", "title"] 
          		enable_sort => "false"
          		sort => "comments_count"
     }

ruby {
   	  code =>"
			event.set('del_id',event.get('[author_name]'))
		"
}

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

}

output {
  	stdout { codec => rubydebug }

}

```

i am not getting the response from the elasticsearch filter plugin.can someone whats wrong.  
getting only "null" ...

Please help

---

<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 19, 2018, 2:14pm UTC](https://discuss.elastic.co/t/elastic-search-filter-plugin-is-not-working/113013/2 "2018-01-19T14:14:56Z")

</div>

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