Module org.apache.lucene.join
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 ClassesModifier and TypeClassDescription(package private) static class(package private) static classNested classes/interfaces inherited from class org.apache.lucene.search.join.DocValuesTermsCollector
DocValuesTermsCollector.Function<R> -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final BytesRefHashprivate static final int(package private) final ScoreMode(package private) Scorable(package private) float[]Fields inherited from class org.apache.lucene.search.join.DocValuesTermsCollector
docValues -
Constructor Summary
ConstructorsConstructorDescriptionTermsWithScoreCollector(DocValuesTermsCollector.Function<DV> docValuesCall, ScoreMode scoreMode) -
Method Summary
Modifier and TypeMethodDescription(package private) static TermsWithScoreCollector<?> Chooses the rightTermsWithScoreCollectorimplementation.float[]Indicates what features are required from the scorer.voidCalled before successive calls toLeafCollector.collect(int).Methods inherited from class org.apache.lucene.search.join.DocValuesTermsCollector
doSetNextReader, sortedDocValues, sortedSetDocValuesMethods inherited from class org.apache.lucene.search.SimpleCollector
collect, getLeafCollectorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.lucene.search.Collector
getLeafCollector, setWeightMethods inherited from interface org.apache.lucene.search.LeafCollector
collect, competitiveIterator, finish
-
Field Details
-
INITIAL_ARRAY_SIZE
private static final int INITIAL_ARRAY_SIZE- See Also:
-
collectedTerms
-
scoreMode
-
scorer
Scorable scorer -
scoreSums
float[] scoreSums
-
-
Constructor Details
-
TermsWithScoreCollector
TermsWithScoreCollector(DocValuesTermsCollector.Function<DV> docValuesCall, ScoreMode scoreMode)
-
-
Method Details
-
getCollectedTerms
- Specified by:
getCollectedTermsin interfaceGenericTermsCollector
-
getScoresPerTerm
public float[] getScoresPerTerm()- Specified by:
getScoresPerTermin interfaceGenericTermsCollector
-
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- Overrides:
setScorerin classSimpleCollector- Throws:
IOException
-
create
static TermsWithScoreCollector<?> create(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
-
scoreMode
Description copied from interface:CollectorIndicates what features are required from the scorer.
-