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 java.lang.Object implements LeafCollector
-
-
Field Summary
Fields Modifier and Type Field Description (package private) boolean
collectedAllCompetitiveHits
(package private) LeafFieldComparator
comparator
(package private) int
reverseMul
(package private) Scorable
scorer
-
Constructor Summary
Constructors Constructor Description TopFieldLeafCollector(FieldValueHitQueue<FieldValueHitQueue.Entry> queue, Sort sort, LeafReaderContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
collectAnyHit(int doc, int hitsCollected)
(package private) void
collectCompetitiveHit(int doc)
DocIdSetIterator
competitiveIterator()
Optionally returns an iterator over competitive documents.(package private) void
countHit(int doc)
void
setScorer(Scorable scorer)
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, collect, finish
-
-
-
-
Field Detail
-
comparator
final LeafFieldComparator comparator
-
reverseMul
final int reverseMul
-
scorer
Scorable scorer
-
collectedAllCompetitiveHits
boolean collectedAllCompetitiveHits
-
-
Constructor Detail
-
TopFieldLeafCollector
TopFieldLeafCollector(FieldValueHitQueue<FieldValueHitQueue.Entry> queue, Sort sort, LeafReaderContext context) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
countHit
void countHit(int doc) throws java.io.IOException
- Throws:
java.io.IOException
-
thresholdCheck
boolean thresholdCheck(int doc) throws java.io.IOException
- Throws:
java.io.IOException
-
collectCompetitiveHit
void collectCompetitiveHit(int doc) throws java.io.IOException
- Throws:
java.io.IOException
-
collectAnyHit
void collectAnyHit(int doc, int hitsCollected) throws java.io.IOException
- Throws:
java.io.IOException
-
setScorer
public void setScorer(Scorable scorer) throws java.io.IOException
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:
java.io.IOException
-
competitiveIterator
public DocIdSetIterator competitiveIterator() throws java.io.IOException
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:
java.io.IOException
-
-