aruggero commented on code in PR #3433:
URL: https://github.com/apache/solr/pull/3433#discussion_r2235383153
##########
solr/modules/ltr/src/java/org/apache/solr/ltr/LTRScoringQuery.java:
##########
@@ -368,17 +376,7 @@ public class ModelWeight extends Weight {
private final float[] modelFeatureValuesNormalized;
private final Feature.FeatureWeight[] extractedFeatureWeights;
- // List of all the feature names, values - used for both scoring and
logging
- /*
- * What is the advantage of using a hashmap here instead of an array of
objects?
- * A set of arrays was used earlier and the elements were accessed
using the featureId.
- * With the updated logic to create weights selectively,
- * the number of elements in the array can be fewer than the total
number of features.
- * When [features] are not requested, only the model features are
extracted.
- * In this case, the indexing by featureId, fails. For this reason,
- * we need a map which holds just the features that were triggered by
the documents in the result set.
- *
- */
+ // All the features
Review Comment:
Would something like "// List of features. It has the feature store
dimension but is populated only with the necessary features." be better?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]