abstract class TermsWithScoreCollector<DV> extends DocValuesTermsCollector<DV> implements GenericTermsCollector
Modifier and Type | Class and Description |
---|---|
(package private) static class |
TermsWithScoreCollector.MV |
(package private) static class |
TermsWithScoreCollector.SV |
DocValuesTermsCollector.Function<R>
Modifier and Type | Field and Description |
---|---|
(package private) BytesRefHash |
collectedTerms |
private static int |
INITIAL_ARRAY_SIZE |
(package private) ScoreMode |
scoreMode |
(package private) Scorable |
scorer |
(package private) float[] |
scoreSums |
docValues
Constructor and Description |
---|
TermsWithScoreCollector(DocValuesTermsCollector.Function<DV> docValuesCall,
ScoreMode scoreMode) |
Modifier and Type | Method and Description |
---|---|
(package private) static TermsWithScoreCollector<?> |
create(java.lang.String field,
boolean multipleValuesPerDocument,
ScoreMode scoreMode)
Chooses the right
TermsWithScoreCollector implementation. |
BytesRefHash |
getCollectedTerms() |
float[] |
getScoresPerTerm() |
ScoreMode |
scoreMode()
Indicates what features are required from the scorer.
|
void |
setScorer(Scorable scorer)
Called before successive calls to
LeafCollector.collect(int) . |
binaryDocValues, doSetNextReader, sortedSetDocValues
collect, getLeafCollector
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createCollectorMV, createCollectorSV, verbose, wrap
getLeafCollector
private static final int INITIAL_ARRAY_SIZE
final BytesRefHash collectedTerms
final ScoreMode scoreMode
Scorable scorer
float[] scoreSums
TermsWithScoreCollector(DocValuesTermsCollector.Function<DV> docValuesCall, ScoreMode scoreMode)
public BytesRefHash getCollectedTerms()
getCollectedTerms
in interface GenericTermsCollector
public float[] getScoresPerTerm()
getScoresPerTerm
in interface GenericTermsCollector
public void setScorer(Scorable scorer) throws java.io.IOException
LeafCollector
LeafCollector.collect(int)
. Implementations
that need the score of the current document (passed-in to
LeafCollector.collect(int)
), should save the passed-in Scorer and call
scorer.score() when needed.setScorer
in interface LeafCollector
setScorer
in class SimpleCollector
java.io.IOException
static TermsWithScoreCollector<?> create(java.lang.String field, boolean multipleValuesPerDocument, ScoreMode scoreMode)
TermsWithScoreCollector
implementation.field
- The field to collect terms formultipleValuesPerDocument
- Whether the field to collect terms for has multiple values per document.TermsWithScoreCollector
instance