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) voidcollectAnyHit(int doc, int hitsCollected) (package private) voidcollectCompetitiveHit(int doc) Optionally returns an iterator over competitive documents.(package private) voidcountHit(int doc) voidCalled before successive calls toLeafCollector.collect(int).(package private) booleanthresholdCheck(int doc) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.lucene.search.LeafCollector
collect, collect, finish
-
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:LeafCollectorCalled 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:
setScorerin interfaceLeafCollector- Throws:
IOException
-
competitiveIterator
Description copied from interface:LeafCollectorOptionally 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
nullwhich is interpreted as the collector provide any competitive iterator.- Specified by:
competitiveIteratorin interfaceLeafCollector- Throws:
IOException
-