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


##########
changelog/unreleased/SOLR-3191-fl-exclusions.yml:
##########
@@ -0,0 +1,8 @@
+# See https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc
+title: The `fl` parameter now accepts field exclusions, such as `fl=-title` or 
`fl=*,-attr_*`, to return all fields except those named or matching a glob.
+type: added
+authors:
+  - name: Scott Stults

Review Comment:
   Shall we credit others that helped make this happen?  Honestly I don't know 
to what degree this may or may not borrow from the work of others.



##########
solr/core/src/java/org/apache/solr/search/SolrReturnFields.java:
##########
@@ -246,6 +259,27 @@ private void add(
 
         int start = sp.pos;
 
+        // exclusion: -field or -glob*
+        if (sp.ch() == '-') {
+          sp.pos++;
+          String excluded = getFieldName(sp);
+          char next = sp.ch();
+          if (excluded == null || !(Character.isWhitespace(next) || next == 
',' || next == 0)) {
+            sp.pos = start + 1;
+            excluded = sp.getGlobbedId(null);
+            next = sp.ch();
+          }

Review Comment:
   what's this part about?



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