.endObject().endObject().bytes()).execute()
.actionGet();
assertThat(searchResponse.hits().totalHits(), equalTo(2l));
assertThat(searchResponse.hits().hits().length, equalTo(0));
TermsFacet facet = searchResponse.facets().facet("facet1");
logFacet(facet);
assertThat(facet.entries().size(), equalTo(4));
assertThat(facet.entries().get(0).term(),equalTo("2"));
assertThat(facet.entries().get(0).count(), equalTo(2));
assertThat(facet.entries().get(1).term(),
anyOf(equalTo("1"), equalTo("3"),equalTo("4")));
assertThat(facet.entries().get(1).count(), equalTo(1));
assertThat(facet.entries().get(2).term(),
anyOf(equalTo("1"), equalTo("3"),equalTo("4")));
assertThat(facet.entries().get(2).count(), equalTo(1));
assertThat(facet.entries().get(3).term(),
anyOf(equalTo("1"), equalTo("3"),equalTo("4")));
assertThat(facet.entries().get(3).count(), equalTo(1));
}
}