Module org.apache.lucene.core
Package org.apache.lucene.search
Class TopFieldCollector.TopFieldLeafCollector
java.lang.Object
org.apache.lucene.search.TopFieldCollector.TopFieldLeafCollector
- All Implemented Interfaces:
LeafCollector
- Enclosing class:
- TopFieldCollector
private abstract class TopFieldCollector.TopFieldLeafCollector
extends Object
implements LeafCollector
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) boolean
(package private) final LeafFieldComparator
(package private) final int
(package private) Scorable
-
Constructor Summary
ConstructorsConstructorDescriptionTopFieldLeafCollector
(FieldValueHitQueue<FieldValueHitQueue.Entry> queue, Sort sort, LeafReaderContext context) -
Method Summary
Modifier and TypeMethodDescription(package private) void
collectAnyHit
(int doc, int hitsCollected) (package private) void
collectCompetitiveHit
(int doc) Optionally returns an iterator over competitive documents.(package private) void
countHit
(int doc) void
Called before successive calls toLeafCollector.collect(int)
.(package private) boolean
thresholdCheck
(int doc) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.lucene.search.LeafCollector
collect
-
Field Details
-
comparator
-
reverseMul
final int reverseMul -
scorer
Scorable scorer -
collectedAllCompetitiveHits
boolean collectedAllCompetitiveHits
-
-
Constructor Details
-
TopFieldLeafCollector
TopFieldLeafCollector(FieldValueHitQueue<FieldValueHitQueue.Entry> queue, Sort sort, LeafReaderContext context) throws IOException - Throws:
IOException
-
-
Method Details
-
countHit
- Throws:
IOException
-
thresholdCheck
- Throws:
IOException
-
collectCompetitiveHit
- Throws:
IOException
-
collectAnyHit
- Throws:
IOException
-
setScorer
Description copied from interface:LeafCollector
Called before successive calls toLeafCollector.collect(int)
. Implementations that need the score of the current document (passed-in toLeafCollector.collect(int)
), should save the passed-in Scorer and call scorer.score() when needed.- Specified by:
setScorer
in interfaceLeafCollector
- Throws:
IOException
-
competitiveIterator
Description copied from interface:LeafCollector
Optionally returns an iterator over competitive documents.Collectors should delegate this method to their comparators if their comparators provide the skipping functionality over non-competitive docs.
The default is to return
null
which is interpreted as the collector provide any competitive iterator.- Specified by:
competitiveIterator
in interfaceLeafCollector
- Throws:
IOException
-