public class TopSuggestDocs extends TopDocs
Modifier and Type | Class and Description |
---|---|
static class |
TopSuggestDocs.SuggestScoreDoc
ScoreDoc with an
additional CharSequence key |
Modifier and Type | Field and Description |
---|---|
static TopSuggestDocs |
EMPTY
Singleton for empty
TopSuggestDocs |
Constructor and Description |
---|
TopSuggestDocs(TotalHits totalHits,
TopSuggestDocs.SuggestScoreDoc[] scoreDocs)
|
Modifier and Type | Method and Description |
---|---|
static TopSuggestDocs |
merge(int topN,
TopSuggestDocs[] shardHits)
Returns a new TopSuggestDocs, containing topN results across
the provided TopSuggestDocs, sorting by score.
|
TopSuggestDocs.SuggestScoreDoc[] |
scoreLookupDocs()
Returns
TopSuggestDocs.SuggestScoreDoc s
for this instance |
public static final TopSuggestDocs EMPTY
TopSuggestDocs
public TopSuggestDocs(TotalHits totalHits, TopSuggestDocs.SuggestScoreDoc[] scoreDocs)
public TopSuggestDocs.SuggestScoreDoc[] scoreLookupDocs()
TopSuggestDocs.SuggestScoreDoc
s
for this instancepublic static TopSuggestDocs merge(int topN, TopSuggestDocs[] shardHits)
TopSuggestDocs
instance must be sorted.
Analogous to TopDocs.merge(int, org.apache.lucene.search.TopDocs[])
for TopSuggestDocs
NOTE: assumes every shardHit
is already sorted by scoreCopyright © 2000-2019 Apache Software Foundation. All Rights Reserved.