public class FieldValueFeature extends Feature
{
"name": "rawHits",
"class": "org.apache.solr.ltr.feature.FieldValueFeature",
"params": {
"field": "hits"
}
}
There are 4 different types of FeatureScorers that a FieldValueFeatureWeight may use. The chosen scorer depends on the field attributes.
FieldValueFeatureScorer (FVFS): used for stored=true, no matter if docValues=true or docValues=false
NumericDocValuesFVFS: used for stored=false and docValues=true, if docValueType == NUMERIC
SortedDocValuesFVFS: used for stored=false and docValues=true, if docValueType == SORTED
DefaultValueFVFS: used for stored=false and docValues=true, a fallback scorer that is used on segments where no document has a value set in the field of this feature
| Modifier and Type | Class and Description |
|---|---|
class |
FieldValueFeature.FieldValueFeatureWeight |
Feature.FeatureWeightNULL_ACCOUNTABLE| Constructor and Description |
|---|
FieldValueFeature(String name,
Map<String,Object> params) |
| Modifier and Type | Method and Description |
|---|---|
Feature.FeatureWeight |
createWeight(IndexSearcher searcher,
boolean needsScores,
SolrQueryRequest request,
Query originalQuery,
Map<String,String[]> efi) |
String |
getField() |
LinkedHashMap<String,Object> |
paramsToMap() |
void |
setField(String field) |
protected void |
validate()
As part of creation of a feature instance, this function confirms
that the feature parameters are valid.
|
defaultParamsToMap, equals, getDefaultValue, getIndex, getInstance, getName, hashCode, ramBytesUsed, setDefaultValue, setIndex, toString, visitclassHash, createWeight, rewrite, sameClassAs, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetChildResourcespublic String getField()
public void setField(String field)
public LinkedHashMap<String,Object> paramsToMap()
paramsToMap in class Featureprotected void validate()
throws FeatureException
Featurevalidate in class FeatureFeatureException - Feature Exceptionpublic Feature.FeatureWeight createWeight(IndexSearcher searcher, boolean needsScores, SolrQueryRequest request, Query originalQuery, Map<String,String[]> efi) throws IOException
createWeight in class FeatureIOExceptionCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.