Package org.apache.solr.ltr
Class LTRScoringQuery.ModelWeight
java.lang.Object
org.apache.lucene.search.Weight
org.apache.solr.ltr.LTRScoringQuery.ModelWeight
- All Implemented Interfaces:
org.apache.lucene.search.SegmentCacheable
- Enclosing class:
LTRScoringQuery
public class LTRScoringQuery.ModelWeight
extends org.apache.lucene.search.Weight
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.apache.lucene.search.Weight
org.apache.lucene.search.Weight.DefaultBulkScorer, org.apache.lucene.search.Weight.DefaultScorerSupplier -
Field Summary
Fields inherited from class org.apache.lucene.search.Weight
parentQuery -
Constructor Summary
ConstructorsConstructorDescriptionModelWeight(Feature.FeatureWeight[] modelFeatureWeights, int allFeaturesSize) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.search.Explanationexplain(org.apache.lucene.index.LeafReaderContext context, int doc) float[]booleanisCacheable(org.apache.lucene.index.LeafReaderContext ctx) modelScorer(org.apache.lucene.index.LeafReaderContext context) voidGoes through all the stored feature values, and calculates the normalized values for all the features that will be used for scoring.org.apache.lucene.search.ScorerSupplierscorerSupplier(org.apache.lucene.index.LeafReaderContext context) Methods inherited from class org.apache.lucene.search.Weight
bulkScorer, count, getQuery, matches, scorer
-
Constructor Details
-
ModelWeight
-
-
Method Details
-
getAllFeaturesInStore
-
getModelFeatureValuesNormalized
public float[] getModelFeatureValuesNormalized() -
normalizeFeatures
public void normalizeFeatures()Goes through all the stored feature values, and calculates the normalized values for all the features that will be used for scoring. Then calculate and return the model's score. -
explain
public org.apache.lucene.search.Explanation explain(org.apache.lucene.index.LeafReaderContext context, int doc) throws IOException - Specified by:
explainin classorg.apache.lucene.search.Weight- Throws:
IOException
-
scorerSupplier
public org.apache.lucene.search.ScorerSupplier scorerSupplier(org.apache.lucene.index.LeafReaderContext context) throws IOException - Specified by:
scorerSupplierin classorg.apache.lucene.search.Weight- Throws:
IOException
-
modelScorer
public LTRScoringQuery.ModelWeight.ModelScorer modelScorer(org.apache.lucene.index.LeafReaderContext context) throws IOException - Throws:
IOException
-
isCacheable
public boolean isCacheable(org.apache.lucene.index.LeafReaderContext ctx)
-