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, sortedSetDocValuescollect, getLeafCollectorclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateCollectorMV, createCollectorSV, verbose, wrapgetLeafCollectorprivate 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 GenericTermsCollectorpublic float[] getScoresPerTerm()
getScoresPerTerm in interface GenericTermsCollectorpublic void setScorer(Scorable scorer) throws java.io.IOException
LeafCollectorLeafCollector.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 LeafCollectorsetScorer in class SimpleCollectorjava.io.IOExceptionstatic 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