Hi,
I have a search case that I want to find documents that a specific term(word) has been repeated twice or more in a specific field of those documents. Some queries like Match query doesn't work in such a this situations. I've used keyword analyzer with wildcard query to achieve the result. For example, the below query returns documents that their name field has 'John' term twice or more:
"query": {
"wildcard": {
"name.keyword": "*john *john*"
}
}
It works and there isn't any problem with its result. But I have a new need now and I want phonetic matching. I've updated index mapping and name field has a new phonetic field in its fields structure with keyword analyzer and phonetic filter next to previous keyword field. When i execute below query, it doesn't return any result.
"query": {
"wildcard": {
"name.phonetic": "*john *john*"
}
}
What's wrong with that? Is there any other way to achieve this result?
Thanks in advance