aruggero commented on code in PR #1586: URL: https://github.com/apache/solr/pull/1586#discussion_r1175427239
########## solr/modules/ltr/src/java/org/apache/solr/ltr/FeatureLogger.java: ########## @@ -33,9 +33,13 @@ public enum FeatureFormat { protected final FeatureFormat featureFormat; - protected FeatureLogger(String fvCacheName, FeatureFormat f) { + protected final Boolean extractAll; Review Comment: logAll also here? ########## solr/modules/ltr/src/java/org/apache/solr/ltr/SolrQueryRequestContextUtils.java: ########## @@ -29,8 +29,11 @@ public class SolrQueryRequestContextUtils { /** key of the scoring queries in the request context */ private static final String SCORING_QUERIES = LTR_PREFIX + "scoring_queries"; + /** key of the isPrintingFeatures flag in the request context */ + private static final String IS_LOGGING_FEATURES = LTR_PREFIX + "isLoggingFeatures"; + /** key of the isExtractingFeatures flag in the request context */ Review Comment: isLoggingAllFeatures? ########## solr/modules/ltr/src/java/org/apache/solr/ltr/SolrQueryRequestContextUtils.java: ########## @@ -29,8 +29,11 @@ public class SolrQueryRequestContextUtils { /** key of the scoring queries in the request context */ private static final String SCORING_QUERIES = LTR_PREFIX + "scoring_queries"; + /** key of the isPrintingFeatures flag in the request context */ Review Comment: isLoggingFeatures? ########## solr/modules/ltr/src/java/org/apache/solr/ltr/response/transform/LTRFeatureLoggerTransformerFactory.java: ########## @@ -146,7 +153,7 @@ public DocTransformer create(String name, SolrParams localparams, SolrQueryReque * * @return a feature logger for the format specified. */ - private FeatureLogger createFeatureLogger(String formatStr) { + private FeatureLogger createFeatureLogger(String formatStr, Boolean extractAll) { Review Comment: logAll? ########## solr/modules/ltr/src/java/org/apache/solr/ltr/CSVFeatureLogger.java: ########## @@ -23,14 +23,14 @@ public class CSVFeatureLogger extends FeatureLogger { private final char keyValueSep; private final char featureSep; - public CSVFeatureLogger(String fvCacheName, FeatureFormat f) { - super(fvCacheName, f); + public CSVFeatureLogger(String fvCacheName, FeatureFormat f, boolean extractAll) { Review Comment: logAll instead of extractAll? ########## solr/modules/ltr/src/java/org/apache/solr/ltr/response/transform/LTRFeatureLoggerTransformerFactory.java: ########## @@ -156,7 +163,7 @@ private FeatureLogger createFeatureLogger(String formatStr) { if (fvCacheName == null) { throw new IllegalArgumentException("a fvCacheName must be configured"); } - return new CSVFeatureLogger(fvCacheName, format, csvKeyValueDelimiter, csvFeatureSeparator); + return new CSVFeatureLogger(fvCacheName, format, extractAll, csvKeyValueDelimiter, csvFeatureSeparator); Review Comment: logAll? ########## solr/modules/ltr/src/java/org/apache/solr/ltr/SolrQueryRequestContextUtils.java: ########## @@ -54,18 +57,22 @@ public static LTRScoringQuery[] getScoringQueries(SolrQueryRequest req) { } /** isExtractingFeatures flag accessors */ - public static void setIsExtractingFeatures(SolrQueryRequest req) { - req.getContext().put(IS_EXTRACTING_FEATURES, Boolean.TRUE); + public static void enableFeatureLogging(SolrQueryRequest req) { + req.getContext().put(IS_LOGGING_FEATURES, Boolean.TRUE); } - public static void clearIsExtractingFeatures(SolrQueryRequest req) { - req.getContext().put(IS_EXTRACTING_FEATURES, Boolean.FALSE); + public static boolean isLoggingFeatures(SolrQueryRequest req) { + return Boolean.TRUE.equals(req.getContext().get(IS_LOGGING_FEATURES)); } - public static boolean isExtractingFeatures(SolrQueryRequest req) { - return Boolean.TRUE.equals(req.getContext().get(IS_EXTRACTING_FEATURES)); + public static void logAllFeatures(SolrQueryRequest req, Boolean logAll) { Review Comment: setLogAllFeatures? ########## solr/modules/ltr/src/java/org/apache/solr/ltr/SolrQueryRequestContextUtils.java: ########## @@ -54,18 +57,22 @@ public static LTRScoringQuery[] getScoringQueries(SolrQueryRequest req) { } /** isExtractingFeatures flag accessors */ Review Comment: isLoggingFeatures? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org