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.FeatureWeight
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.
|
equals, getDefaultValue, getIndex, getInstance, getName, hashCode, setDefaultValue, setIndex, toString
classHash, createWeight, rewrite, sameClassAs, toString
public String getDf()
public void setDf(String df)
public String getQ()
public void setQ(String q)
public LinkedHashMap<String,Object> paramsToMap()
paramsToMap
in class Feature
public Feature.FeatureWeight createWeight(IndexSearcher searcher, boolean needsScores, SolrQueryRequest request, Query originalQuery, Map<String,String[]> efi) throws IOException
createWeight
in class Feature
IOException
protected void validate() throws FeatureException
Feature
validate
in class Feature
FeatureException
- Feature ExceptionCopyright © 2000-2019 Apache Software Foundation. All Rights Reserved.