tomglk commented on a change in pull request #123:
URL: https://github.com/apache/solr/pull/123#discussion_r633269843



##########
File path: 
solr/contrib/ltr/src/test/org/apache/solr/ltr/feature/TestFieldValueFeature.java
##########
@@ -56,11 +62,13 @@ public void before() throws Exception {
 
     assertU(commit());
 
-    loadFeature("popularity", FieldValueFeature.class.getName(),
-            "{\"field\":\"popularity\"}");
+    for (String field : FIELD_NAMES) {
+      loadFeature(field, FieldValueFeature.class.getName(),
+              "{\"field\":\""+field+"\"}");
 
-    loadModel("popularity-model", LinearModel.class.getName(),
-            new String[] {"popularity"}, "{\"weights\":{\"popularity\":1.0}}");
+      loadModel(field + "-model", LinearModel.class.getName(),
+              new String[] {field}, "{\"weights\":{\""+field+"\":1.0}}");
+    }

Review comment:
       Thanks for continuing the investigation!
   I think the example you posted here should work, although I am still a bit 
irritated regarding the `extractAllFeatures = true`.
   
   As user I would expect it to always return all the features that were 
created, no matter if that happened before or after the model. 
   But the code makes it explicit, that these information should not be 
modified (`allFeatures` is an unmodifiableList).
   I think that a nicely placed docString could avoid some confusion.




-- 
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.

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

Reply via email to