List<Map<String, Object>> products = createProducts("ProductName",
"BMW 318", "BMW 528", "BMW M3", "the BMW 320", "VW Jetta");
indexProducts(products);
FstStats emptyFstStats = getStatistics();
assertThat(emptyFstStats.getStats(), hasSize(0));
assertThat(getFstSizeSum(emptyFstStats), equalTo(0L));
SuggestionQuery query = new SuggestionQuery(index, type, "ProductName.keyword", "b")
.suggestType("full").analyzer("stop").size(10);
List<String> suggestions = getSuggestions(query);
assertSuggestions(suggestions, "BMW 318", "BMW 528", "BMW M3", "the BMW 320");
FstStats filledFstStats = getStatistics();
assertThat(filledFstStats.getStats(), hasSize(greaterThanOrEqualTo(1)));
List<FstStats.FstIndexShardStats> allStats = Lists.newArrayList(filledFstStats.getStats());
assertThat(allStats.get(0).getShardId().id(), greaterThanOrEqualTo(0));
assertThat(getFstSizeSum(filledFstStats), greaterThan(0L));
}