diff options
author | Jim Ferenczi <jim.ferenczi@elastic.co> | 2017-02-27 18:39:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-27 18:39:04 +0100 |
commit | 5c84640126e66de68f6e742ccb1a9d351f638fd4 (patch) | |
tree | 37f88eb250a94681c0e3083e7e539334975d6073 /core/src/main/java/org/elasticsearch/search/suggest/completion | |
parent | 48280a940379e5ba7839c9dd2d1483951855473a (diff) |
Upgrade to lucene-6.5.0-snapshot-d00c5ca (#23385)
Lucene upgrade
Diffstat (limited to 'core/src/main/java/org/elasticsearch/search/suggest/completion')
-rw-r--r-- | core/src/main/java/org/elasticsearch/search/suggest/completion/CompletionSuggester.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/main/java/org/elasticsearch/search/suggest/completion/CompletionSuggester.java b/core/src/main/java/org/elasticsearch/search/suggest/completion/CompletionSuggester.java index b048977741..abc8d209cd 100644 --- a/core/src/main/java/org/elasticsearch/search/suggest/completion/CompletionSuggester.java +++ b/core/src/main/java/org/elasticsearch/search/suggest/completion/CompletionSuggester.java @@ -184,8 +184,10 @@ public class CompletionSuggester extends Suggester<CompletionSuggestionContext> private final SuggestDocPriorityQueue pq; private final Map<Integer, SuggestDoc> scoreDocMap; + // TODO: expose dup removal + TopDocumentsCollector(int num) { - super(1); // TODO hack, we don't use the underlying pq, so we allocate a size of 1 + super(1, false); // TODO hack, we don't use the underlying pq, so we allocate a size of 1 this.num = num; this.scoreDocMap = new LinkedHashMap<>(num); this.pq = new SuggestDocPriorityQueue(num); |