Package org.apache.lucene.search.join
Class TermsWithScoreCollector<DV>
- java.lang.Object
-
- org.apache.lucene.search.SimpleCollector
-
- org.apache.lucene.search.join.DocValuesTermsCollector<DV>
-
- org.apache.lucene.search.join.TermsWithScoreCollector<DV>
-
- All Implemented Interfaces:
Collector,GenericTermsCollector,LeafCollector
- Direct Known Subclasses:
TermsWithScoreCollector.MV,TermsWithScoreCollector.SV
abstract class TermsWithScoreCollector<DV> extends DocValuesTermsCollector<DV> implements GenericTermsCollector
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classTermsWithScoreCollector.MV(package private) static classTermsWithScoreCollector.SV-
Nested classes/interfaces inherited from class org.apache.lucene.search.join.DocValuesTermsCollector
DocValuesTermsCollector.Function<R>
-
-
Field Summary
Fields Modifier and Type Field Description (package private) BytesRefHashcollectedTermsprivate static intINITIAL_ARRAY_SIZE(package private) ScoreModescoreMode(package private) Scorablescorer(package private) float[]scoreSums-
Fields inherited from class org.apache.lucene.search.join.DocValuesTermsCollector
docValues
-
-
Constructor Summary
Constructors Constructor Description TermsWithScoreCollector(DocValuesTermsCollector.Function<DV> docValuesCall, ScoreMode scoreMode)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static TermsWithScoreCollector<?>create(java.lang.String field, boolean multipleValuesPerDocument, ScoreMode scoreMode)Chooses the rightTermsWithScoreCollectorimplementation.BytesRefHashgetCollectedTerms()float[]getScoresPerTerm()ScoreModescoreMode()Indicates what features are required from the scorer.voidsetScorer(Scorable scorer)Called before successive calls toLeafCollector.collect(int).-
Methods inherited from class org.apache.lucene.search.join.DocValuesTermsCollector
binaryDocValues, doSetNextReader, sortedSetDocValues
-
Methods inherited from class org.apache.lucene.search.SimpleCollector
collect, getLeafCollector
-
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.Collector
getLeafCollector
-
Methods inherited from interface org.apache.lucene.search.LeafCollector
competitiveIterator
-
-
-
-
Field Detail
-
INITIAL_ARRAY_SIZE
private static final int INITIAL_ARRAY_SIZE
- See Also:
- Constant Field Values
-
collectedTerms
final BytesRefHash collectedTerms
-
scoreMode
final ScoreMode scoreMode
-
scorer
Scorable scorer
-
scoreSums
float[] scoreSums
-
-
Constructor Detail
-
TermsWithScoreCollector
TermsWithScoreCollector(DocValuesTermsCollector.Function<DV> docValuesCall, ScoreMode scoreMode)
-
-
Method Detail
-
getCollectedTerms
public BytesRefHash getCollectedTerms()
- Specified by:
getCollectedTermsin interfaceGenericTermsCollector
-
getScoresPerTerm
public float[] getScoresPerTerm()
- Specified by:
getScoresPerTermin interfaceGenericTermsCollector
-
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- Overrides:
setScorerin classSimpleCollector- Throws:
java.io.IOException
-
create
static TermsWithScoreCollector<?> create(java.lang.String field, boolean multipleValuesPerDocument, ScoreMode scoreMode)
Chooses the rightTermsWithScoreCollectorimplementation.- Parameters:
field- The field to collect terms formultipleValuesPerDocument- Whether the field to collect terms for has multiple values per document.- Returns:
- a
TermsWithScoreCollectorinstance
-
-