assertThat(facet.name(), equalTo("facet1"));
assertThat(facet.entries().size(), equalTo(2));
assertThat(facet.entries().get(0).term(), anyOf(equalTo("green"), equalTo("blue")));
assertThat(facet.entries().get(0).count(), equalTo(1));
assertThat(facet.entries().get(1).term(), anyOf(equalTo("green"), equalTo("blue")));
assertThat(facet.entries().get(1).count(), equalTo(1));
searchResponse = client.prepareSearch()
.setQuery(matchAllQuery())
.setFilter(termFilter("tag", "blue"))
.addFacet(termsFacet("facet1").field("tag").size(10))