dsmiley commented on code in PR #5188:
URL: https://github.com/apache/solr/pull/5188#discussion_r4369203501


##########
solr/core/src/test/org/apache/solr/search/ReturnFieldsTest.java:
##########
@@ -465,7 +505,7 @@ public void testWhiteboxSolrDocumentConversion() {
             new SolrReturnFields(req()),
             new SolrReturnFields(req("fl", "*")),
             new SolrReturnFields(req("fl", "*,score")),
-            new SolrReturnFields(req("fl", "id,subword,uniq,foo_*,store_*")),
+            new SolrReturnFields(req("fl", "id,subword,uniq,foo_*,store*")),

Review Comment:
   It passed by accident. Before, any glob in `fl` made `getLuceneFieldNames()` 
null, which `convertLuceneDocToSolrDoc` took to mean "convert every field in 
the doc", so `store` was converted even though `store_*` doesn't match it. Now 
only wanted fields are converted, so the test glob needed to be `store*`. 
That's the "loaded fields nothing asked for" fix described in the PR.
   
   🤖 AI-assisted reply.



##########
solr/core/src/java/org/apache/solr/search/SolrDocumentFetcher.java:
##########
@@ -875,8 +875,10 @@ private Set<String> 
calcDocValueFieldsForReturn(ReturnFields returnFields) {
           }
         }
       } else if (returnFields.hasPatternMatching()) {
-        for (String s : getNonStoredDVs(true)) {
-          if (returnFields.wantsField(s)) {
+        for (String s : getNonStoredDVs(false)) {

Review Comment:
   Agreed, done in e07455a0f95: split into `getNonStoredDVs()` and 
`getNonStoredDVsUsedAsStored()`, and removed the boolean one since it's 
internal.
   
   🤖 AI-assisted reply.



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

Reply via email to