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) booleancollectedAllCompetitiveHits(package private) LeafFieldComparatorcomparator(package private) intreverseMul(package private) Scorablescorer
-
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) voidcollectAnyHit(int doc, int hitsCollected)(package private) voidcollectCompetitiveHit(int doc)DocIdSetIteratorcompetitiveIterator()Optionally returns an iterator over competitive documents.(package private) voidcountHit(int doc)voidsetScorer(Scorable scorer)Called 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, wait
-
Methods inherited from interface org.apache.lucene.search.LeafCollector
collect
-
-
-
-
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: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:
java.io.IOException
-
competitiveIterator
public DocIdSetIterator competitiveIterator() throws java.io.IOException
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:
java.io.IOException
-
-