public String getIndexType() {
return "tweet";
}
SearchResponse query(MyQuery query) {
SearchRequestBuilder builder = client.prepareSearch(getIndexName());
// merge results from shards:
builder.setSearchType(SearchType.QUERY_THEN_FETCH);
return query.initRequestBuilder(builder).execute().actionGet();
}