public abstract class FeatureLogger extends Object
Modifier and Type | Class and Description |
---|---|
static class |
FeatureLogger.FeatureFormat |
Modifier and Type | Field and Description |
---|---|
protected FeatureLogger.FeatureFormat |
featureFormat |
Modifier | Constructor and Description |
---|---|
protected |
FeatureLogger(String fvCacheName,
FeatureLogger.FeatureFormat f) |
Modifier and Type | Method and Description |
---|---|
String |
getFeatureVector(int docid,
LTRScoringQuery scoringQuery,
SolrIndexSearcher searcher)
populate the document with its feature vector
|
boolean |
log(int docid,
LTRScoringQuery scoringQuery,
SolrIndexSearcher searcher,
LTRScoringQuery.FeatureInfo[] featuresInfo)
Log will be called every time that the model generates the feature values
for a document and a query.
|
abstract String |
makeFeatureVector(LTRScoringQuery.FeatureInfo[] featuresInfo) |
protected final FeatureLogger.FeatureFormat featureFormat
protected FeatureLogger(String fvCacheName, FeatureLogger.FeatureFormat f)
public boolean log(int docid, LTRScoringQuery scoringQuery, SolrIndexSearcher searcher, LTRScoringQuery.FeatureInfo[] featuresInfo)
docid
- Solr document id whose features we are savingfeaturesInfo
- List of all the LTRScoringQuery.FeatureInfo
objects which contain name and value
for all the features triggered by the result setpublic abstract String makeFeatureVector(LTRScoringQuery.FeatureInfo[] featuresInfo)
public String getFeatureVector(int docid, LTRScoringQuery scoringQuery, SolrIndexSearcher searcher)
docid
- Solr document idCopyright © 2000-2019 Apache Software Foundation. All Rights Reserved.