magibney commented on code in PR #1557:
URL: https://github.com/apache/solr/pull/1557#discussion_r1164349709
##########
solr/modules/ltr/src/java/org/apache/solr/ltr/feature/FieldValueFeature.java:
##########
@@ -177,7 +177,8 @@ public FieldValueFeatureScorer(
public float score() throws IOException {
try {
- final Document document = context.reader().document(itr.docID(),
fieldAsSet);
+ final Document document =
+ context.reader().storedFields().document(itr.docID(),
fieldAsSet);
Review Comment:
I think this would be good. Scorer should already not be thread-safe, and
should not be called from multiple threads; and because of the way the
`score()` method is called, this would I think be effectively inside a loop.
FWIW I can't think of any problem calling `context.reader()` in the ctor.
--
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]