Input Elasticsearch Query in logstash

Hello! I would like to use a query filtering these parameters in logstash's elasticsearch input>

host.raw = host 1 OR host 2
&
code != "123"

How could I do the query? I have been trying several things for a while without success
ES version is 1.7.1

input{
elasticsearch {
host=>
query => '{ "query": .... }'

The queries need to be in this style - https://www.elastic.co/guide/en/elasticsearch/reference/2.3/query-dsl.html

1 Like