Package org.apache.solr.ltr.feature
Class FieldValueFeature.FieldValueFeatureWeight.DefaultValueFieldValueFeatureScorer
- java.lang.Object
-
- org.apache.lucene.search.Scorable
-
- org.apache.lucene.search.Scorer
-
- org.apache.solr.ltr.feature.Feature.FeatureWeight.FeatureScorer
-
- org.apache.solr.ltr.feature.FieldValueFeature.FieldValueFeatureWeight.DefaultValueFieldValueFeatureScorer
-
- Enclosing class:
- FieldValueFeature.FieldValueFeatureWeight
public final class FieldValueFeature.FieldValueFeatureWeight.DefaultValueFieldValueFeatureScorer extends Feature.FeatureWeight.FeatureScorer
A FeatureScorer that always returns the default value.It is used as a fallback for cases when a segment does not have any documents that contain doc values for a field. By doing so, we prevent a fallback to the FieldValueFeatureScorer, which would also return the default value but in a less performant way because it would first try to read the stored fields for the doc (which aren't present).
-
-
Field Summary
-
Fields inherited from class org.apache.solr.ltr.feature.Feature.FeatureWeight.FeatureScorer
itr, name
-
-
Constructor Summary
Constructors Constructor Description DefaultValueFieldValueFeatureScorer(Feature.FeatureWeight weight, org.apache.lucene.search.DocIdSetIterator itr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float
getMaxScore(int upTo)
float
score()
-
Methods inherited from class org.apache.solr.ltr.feature.Feature.FeatureWeight.FeatureScorer
docID, getDocInfo, iterator, setDocInfo
-
Methods inherited from class org.apache.lucene.search.Scorer
advanceShallow, getWeight, twoPhaseIterator
-
-
-
-
Constructor Detail
-
DefaultValueFieldValueFeatureScorer
public DefaultValueFieldValueFeatureScorer(Feature.FeatureWeight weight, org.apache.lucene.search.DocIdSetIterator itr)
-
-
Method Detail
-
score
public float score() throws IOException
- Specified by:
score
in classFeature.FeatureWeight.FeatureScorer
- Throws:
IOException
-
getMaxScore
public float getMaxScore(int upTo) throws IOException
- Specified by:
getMaxScore
in classorg.apache.lucene.search.Scorer
- Throws:
IOException
-
-