Wildcard phrases with slop using string query

(Vladimir Sidorenko) #1

Elastic supports slop for simple phrases, like "quick fox"~2, but when wildcards are used in string, it doesn't work: "qui* fox"~2

I've found a workaround for this using json query dsl using span_near and match prefix: http://grokbase.com/t/gg/elasticsearch/146vmnsj7r/workaround-for-using-wild-cards-in-phrases-and-proximity-searches-elastic-search

The thing is that I must allow users to make such queries using string query. Is there any other workaround that uses just query string syntax or maybe there's some plugin that extends query string syntax for this specific use case?

Thank you

(Adrien Grand) #2

Hi Vladimir,

I don't think there is a way to support wildcards in phrases with the query_string query.

(system) #3