public class FieldLengthFeature extends Feature
{
"name": "titleLength",
"class": "org.apache.solr.ltr.feature.FieldLengthFeature",
"params": {
"field": "title"
}
}
Note: since this feature relies on norms values that are stored in a single byte
the value of the feature could have a lightly different value.
(see also ClassicSimilarity)| Modifier and Type | Class and Description |
|---|---|
class |
FieldLengthFeature.FieldLengthFeatureWeight |
Feature.FeatureWeightNULL_ACCOUNTABLE| Constructor and Description |
|---|
FieldLengthFeature(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.