cpoerschke commented on a change in pull request #123: URL: https://github.com/apache/solr/pull/123#discussion_r633712857
########## 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: Yes, it's a somewhat quirky behaviour. Operationally it could also cause mysteries e.g. when new features are added to an existing store and the (reasonable) expectation is that they will start producing feature values right away when actually that only happens when the existing model(s) are next re-instantiated. +1 to try and reduce such confusion via documentation somehow. -- 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