I am trying to run a query in elasticsearch cluster from java api; I have a list of string values and I would like to get all documents which contains any one of those string values. How can I do it? I tried the following but did not work.
List<String> tagList = new ArrayList<String>();
tagList.add("grails");
tagList.add("elasticSearch");
tagList.add("java");
SearchResponse response = client.prepareSearch("mongoindex")
.setSearchType(SearchType.QUERY_AND_FETCH)
.setQuery(fieldQuery("tags", tagList))
.setFrom(0).setSize(60).setExplain(true)
.execute()
.actionGet();