elasticsearch wildcard query with ascii folding

elasticsearch, java, lucene

Solution

Try using `field` query with `analyze_wildcard` set to `true`.

By default, elasticsearch doesn't try to analyze text in wildcard queries, it only lowercases it for some queries. Because of this your query is searching for all terms that start with `hélè` and there is no such terms in your index because of ascii folding filter.

Problem

i am searching names using the wildcard query it works fine however when we do search for ascii characters it is not working well like when user search for "Hélè*", its not able to search. note that i have already created analyzer that does ascii folding and lowercase on name field. also its working fine when we do search in query_string. does that mean wildcard is not analyzing the ascii folding and query string does ? if yes then is there any way to achieve wildcard with ascii ? any help will be greatly appreciated. Thanks, Mohsin

Original source