Elasticsearch Java api - Select query for searching text mixed with special characters(John-son)
The problem you have is largely the same as in this question: Elasticsearch wildcard search on not_analyzed field
First, you really don't want to have leading wildcards in your query. Lucene will have to go through every term in your index's dictionary to find terms. This is O(n) in the number of terms, which gets prohibitively expensive. See this article for more details: http://www.found.no/foundation/elasticsearch-from-the-bottom-up/
What's probably happening here is that john-son
is tokenized to john
and son
via the standard
-analyzer. Therefore, there is no john-son
term in the dictionary for your wildcard query to match.