Package org.apache.solr.ltr.feature
Class Feature.FeatureWeight.ValueFeatureScorer
- 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.Feature.FeatureWeight.ValueFeatureScorer
-
- Enclosing class:
- Feature.FeatureWeight
public class Feature.FeatureWeight.ValueFeatureScorer extends Feature.FeatureWeight.FeatureScorer
Default FeatureScorer class that returns the score passed in. Can be used as a simple ValueFeature, or to return a default scorer in case an underlying feature's scorer is null.
-
-
Field Summary
-
Fields inherited from class org.apache.solr.ltr.feature.Feature.FeatureWeight.FeatureScorer
itr, name
-
-
Constructor Summary
Constructors Constructor Description ValueFeatureScorer(Feature.FeatureWeight weight, float constScore, 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
-
ValueFeatureScorer
public ValueFeatureScorer(Feature.FeatureWeight weight, float constScore, org.apache.lucene.search.DocIdSetIterator itr)
-
-
Method Detail
-
score
public float score()
- Specified by:
score
in classFeature.FeatureWeight.FeatureScorer
-
getMaxScore
public float getMaxScore(int upTo) throws IOException
- Specified by:
getMaxScore
in classorg.apache.lucene.search.Scorer
- Throws:
IOException
-
-