elasticsearch - How to handle wildcards in elastic search structured queries -
my use case requires query our elastic search domain trailing wildcards. wanted opinion on best practices of handling such wildcards in queries. do think adding following clauses practice queries: "query" : { "query_string" : { "query" : "attribute:postfix*", "analyze_wildcard" : true, "allow_leading_wildcard" : false, "use_dis_max" : false } } i've disallowed leading wildcards since heavy operation. wanted how analyzing wildcard every query request in long run. understanding is, analyze wildcard have no impact if query doesn't have wildcards. correct? if have possibility of changing mapping type , index settings, right way go create custom analyzer edge-n-gram token filter index prefixes of attribute field. curl -xput http://localhost:9200/your_index -d '{ "settings": { "analysis": { "filt