Client client = elasticSearchClientFactory.getClient();
TermsFacetBuilder tagsFacet = FacetBuilders.termsFacet(TAGS).fields(TAGS).order(ComparatorType.COUNT).size(Integer.MAX_VALUE);</BUG>
SearchRequestBuilder request = client.prepareSearch(readIndex).
setTypes(SEARCH_TYPE).
setQuery(query).
<BUG>addFacet(tagsFacet).</BUG>
setSize(20);
<BUG>if (filter != null && filter.hasClauses()) {
request = request.setPostFilter(filter);
}</BUG>
SearchResponse response = request.execute().actionGet();

Client client = elasticSearchClientFactory.getClient();
SearchRequestBuilder request = client.prepareSearch(readIndex).
setTypes(SEARCH_TYPE).
setQuery(query).
setSize(20);
SearchResponse response = request.execute().actionGet();
