Class 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.
    • Method Detail

      • log

        public 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.FeatureInfo objects 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.
      • getFeatureVector

        public 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
      • isLoggingAll

        public Boolean isLoggingAll()
      • setLogAll

        public void setLogAll​(Boolean logAll)