assertEquals(6, results.get(2).value, 0.01F);
}
public void testKeywordWithPayloads() throws Exception {
Iterable<Input> keys = shuffle(
new Input("foo", 50, new BytesRef("hello")),
new Input("bar", 10, new BytesRef("goodbye")),
new Input("barbar", 12, new BytesRef("thank you")),
new Input("bar", 9, new BytesRef("should be deduplicated")),
new Input("bar", 8, new BytesRef("should also be deduplicated")),
new Input("barbara", 6, new BytesRef("for all the fish")));
AnalyzingSuggester suggester = new AnalyzingSuggester(new MockAnalyzer(random(), MockTokenizer.KEYWORD, false));
suggester.build(new InputArrayIterator(keys));
for (int i = 0; i < 2; i++) {
// top N of 2, but only foo is available