public final class LargeNumHitsTopDocsCollector extends java.lang.Object implements Collector
Modifier and Type | Field and Description |
---|---|
private java.util.List<ScoreDoc> |
hits |
(package private) HitQueue |
pq |
(package private) ScoreDoc |
pqTop |
private int |
requestedHitCount |
(package private) int |
totalHits |
Constructor and Description |
---|
LargeNumHitsTopDocsCollector(int requestedHitCount) |
Modifier and Type | Method and Description |
---|---|
LeafCollector |
getLeafCollector(LeafReaderContext context)
Create a new
collector to collect the given context. |
protected TopDocs |
newTopDocs(ScoreDoc[] results)
Returns a
TopDocs instance containing the given results. |
protected void |
populateResults(ScoreDoc[] results,
int howMany)
Populates the results array with the ScoreDoc instances.
|
ScoreMode |
scoreMode()
Indicates what features are required from the scorer.
|
TopDocs |
topDocs()
Returns the top docs that were collected by this collector.
|
TopDocs |
topDocs(int howMany)
Returns the top docs that were collected by this collector.
|
private final int requestedHitCount
private java.util.List<ScoreDoc> hits
HitQueue pq
ScoreDoc pqTop
int totalHits
public LargeNumHitsTopDocsCollector(int requestedHitCount)
public ScoreMode scoreMode()
Collector
public LeafCollector getLeafCollector(LeafReaderContext context)
Collector
collector
to collect the given context.getLeafCollector
in interface Collector
context
- next atomic reader contextpublic TopDocs topDocs(int howMany)
protected void populateResults(ScoreDoc[] results, int howMany)
protected TopDocs newTopDocs(ScoreDoc[] results)
TopDocs
instance containing the given results. If
results
is null it means there are no results to return,
either because there were 0 calls to collect() or because the arguments to
topDocs were invalid.public TopDocs topDocs()