I have a String field countries of format eg "SS,SX,US,IND,CND,TN" and I have a input String field countryCode which will be of form "SS". How can I query all the records where a given countryCode is in countries in elasticsearch? I have tried with match
and match_phrase
queries but didn't get the desired results.
Query.must(QueryBuilders.matchPhraseQuery("countries", countryCode))