dsmiley commented on code in PR #5298:
URL: https://github.com/apache/solr/pull/5298#discussion_r4795715542
##########
solr/core/src/java/org/apache/solr/search/SolrReturnFields.java:
##########
@@ -528,9 +533,27 @@ public boolean hasPatternMatching() {
return !globs.isEmpty();
}
+ /**
+ * Records the fields a transformer asked to have loaded. A return of
exactly {@link
+ * DocTransformer#ALL_FIELDS} is not a field name; it declares that the
transformer needs the full
+ * document, which {@link #loadsAllFields()} and {@link #loadsField(String)}
then honor.
+ */
+ private void addExtraRequestFields(String[] extraRequestFields) {
+ if (Arrays.equals(extraRequestFields, DocTransformer.ALL_FIELDS)) {
+ loadAllFields = true;
+ } else {
+ Collections.addAll(loadFields, extraRequestFields);
Review Comment:
would you mind renaming `extraRequestFields` here to something with "Load"
and *not* "Request" in it ("Request" implies it should be returned)? I'm
thinking `transformerLoadFields`. WDYT? I know the current name is based on
the method name on the transformer but that name is unfortunate after recent
clarifications on the distinction between "load" and "return".
--
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]