I am new to Elastic Search.I want to include multiple field in my search query something like:
Title=my title and city=mycity or country = mycountry
How can I execute this kind of query using java client? I tried this
SearchResponse response = client.prepareSearch("titan")
.setTypes("vertex")
.setSearchType(SearchType.QUERY_AND_FETCH)
.setQuery(QueryBuilders.fieldQuery("title", "mytitle"))
.setQuery(QueryBuilders.fieldQuery("city", "mycity"))
.setFrom(0).setSize(60).setExplain(true)
.execute()
.actionGet();
but didn't work