Package org.apache.solr.ltr
Class FeatureLogger
- java.lang.Object
- 
- org.apache.solr.ltr.FeatureLogger
 
- 
- Direct Known Subclasses:
- CSVFeatureLogger
 
 public abstract class FeatureLogger extends Object FeatureLogger can be registered in a model and provide a strategy for logging the feature values.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classFeatureLogger.FeatureFormat
 - 
Field SummaryFields Modifier and Type Field Description protected FeatureLogger.FeatureFormatfeatureFormat
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedFeatureLogger(String fvCacheName, FeatureLogger.FeatureFormat f)
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description StringgetFeatureVector(int docid, LTRScoringQuery scoringQuery, SolrIndexSearcher searcher)populate the document with its feature vectorbooleanlog(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 StringmakeFeatureVector(LTRScoringQuery.FeatureInfo[] featuresInfo)
 
- 
- 
- 
Field Detail- 
featureFormatprotected final FeatureLogger.FeatureFormat featureFormat 
 
- 
 - 
Constructor Detail- 
FeatureLoggerprotected FeatureLogger(String fvCacheName, FeatureLogger.FeatureFormat f) 
 
- 
 - 
Method Detail- 
logpublic 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.- Parameters:
- docid- Solr document id whose features we are saving
- featuresInfo- List of all the- LTRScoringQuery.FeatureInfoobjects which contain name and value for all the features triggered by the result set
- Returns:
- true if the logger successfully logged the features, false otherwise.
 
 - 
makeFeatureVectorpublic abstract String makeFeatureVector(LTRScoringQuery.FeatureInfo[] featuresInfo) 
 - 
getFeatureVectorpublic String getFeatureVector(int docid, LTRScoringQuery scoringQuery, SolrIndexSearcher searcher) populate the document with its feature vector- Parameters:
- docid- Solr document id
- Returns:
- String representation of the list of features calculated for docid
 
 
- 
 
-