Elasticsearch plugin query wilcard


#1

Hi
i've a simple question :
Is it possible to use wildcards in query of Elastic input plugin ?

Like this, for example :

input {
elasticsearch {
hosts => ["myhost"]
index => "myindex"
query => '{ "query": { "match": {"myfield":"good*"} } }'
}
....

note : logstash 2.41

Sorry, but i don't find answer in this faq...
Thanks in advance


(Magnus B├Ąck) #2

Logstash's elasticsearch input plugin will support anything supported by the Elasticsearch query DSL. See the wildcard query type. If you don't get it to work I suggest you ask for help in the Elasticsearch category.


#3

Thanks Magnus,
in fact, i coded this with success :

input {
elasticsearch {
hosts => ["myhost"]
index => "myindex"
query => '{ "query": { "wildcard" : {"myfield":"good"} } }'*
}
....


(system) #4

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