public class SolrFeature extends Feature
[{ "name": "isBook",
"class": "org.apache.solr.ltr.feature.SolrFeature",
"params":{ "fq": ["{!terms f=category}book"] }
},
{
"name": "documentRecency",
"class": "org.apache.solr.ltr.feature.SolrFeature",
"params": {
"q": "{!func}recip( ms(NOW,publish_date), 3.16e-11, 1, 1)"
}
}]| Modifier and Type | Class and Description |
|---|---|
class |
SolrFeature.SolrFeatureWeight
Weight for a SolrFeature
|
Feature.FeatureWeightNULL_ACCOUNTABLE| Constructor and Description |
|---|
SolrFeature(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 |
getDf() |
List<String> |
getFq() |
String |
getQ() |
LinkedHashMap<String,Object> |
paramsToMap() |
void |
setDf(String df) |
void |
setFq(List<String> fq) |
void |
setQ(String q) |
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 getDf()
public void setDf(String df)
public String getQ()
public void setQ(String q)
public LinkedHashMap<String,Object> paramsToMap()
paramsToMap in class Featurepublic Feature.FeatureWeight createWeight(IndexSearcher searcher, boolean needsScores, SolrQueryRequest request, Query originalQuery, Map<String,String[]> efi) throws IOException
createWeight in class FeatureIOExceptionprotected void validate()
throws FeatureException
Featurevalidate in class FeatureFeatureException - Feature ExceptionCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.