Package org.apache.solr.ltr.feature
Class OriginalScoreFeature
- java.lang.Object
-
- org.apache.lucene.search.Query
-
- org.apache.solr.ltr.feature.Feature
-
- org.apache.solr.ltr.feature.OriginalScoreFeature
-
- All Implemented Interfaces:
org.apache.lucene.util.Accountable
public class OriginalScoreFeature extends Feature
This feature returns the original score that the document had before performing the reranking. Example configuration:{ "name": "originalScore", "class": "org.apache.solr.ltr.feature.OriginalScoreFeature", "params": { } }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
OriginalScoreFeature.OriginalScoreWeight
-
Nested classes/interfaces inherited from class org.apache.solr.ltr.feature.Feature
Feature.FeatureWeight
-
-
Constructor Summary
Constructors Constructor Description OriginalScoreFeature(String name, Map<String,Object> params)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OriginalScoreFeature.OriginalScoreWeight
createWeight(org.apache.lucene.search.IndexSearcher searcher, boolean needsScores, SolrQueryRequest request, org.apache.lucene.search.Query originalQuery, Map<String,String[]> efi)
LinkedHashMap<String,Object>
paramsToMap()
protected void
validate()
As part of creation of a feature instance, this function confirms that the feature parameters are valid.-
Methods inherited from class org.apache.solr.ltr.feature.Feature
defaultParamsToMap, equals, getDefaultValue, getIndex, getInstance, getName, hashCode, ramBytesUsed, setDefaultValue, setIndex, toString, visit
-
Methods inherited from class org.apache.lucene.search.Query
classHash, createWeight, rewrite, rewrite, sameClassAs, toString
-
-
-
-
Method Detail
-
paramsToMap
public LinkedHashMap<String,Object> paramsToMap()
- Specified by:
paramsToMap
in classFeature
-
validate
protected void validate() throws FeatureException
Description copied from class:Feature
As part of creation of a feature instance, this function confirms that the feature parameters are valid.- Specified by:
validate
in classFeature
- Throws:
FeatureException
- Feature Exception
-
createWeight
public OriginalScoreFeature.OriginalScoreWeight createWeight(org.apache.lucene.search.IndexSearcher searcher, boolean needsScores, SolrQueryRequest request, org.apache.lucene.search.Query originalQuery, Map<String,String[]> efi) throws IOException
- Specified by:
createWeight
in classFeature
- Throws:
IOException
-
-