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
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 ClassesNested classes/interfaces inherited from class org.apache.solr.ltr.feature.Feature
Feature.FeatureWeight -
Field Summary
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateWeight(org.apache.lucene.search.IndexSearcher searcher, boolean needsScores, SolrQueryRequest request, org.apache.lucene.search.Query originalQuery, Map<String, String[]> efi) protected voidvalidate()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, visitMethods inherited from class org.apache.lucene.search.Query
classHash, createWeight, rewrite, sameClassAs, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
Constructor Details
-
OriginalScoreFeature
-
-
Method Details
-
paramsToMap
- Specified by:
paramsToMapin classFeature
-
validate
Description copied from class:FeatureAs part of creation of a feature instance, this function confirms that the feature parameters are valid.- Specified by:
validatein 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:
createWeightin classFeature- Throws:
IOException
-