dsmiley commented on a change in pull request #513:
URL: https://github.com/apache/solr/pull/513#discussion_r789198038



##########
File path: solr/CHANGES-SOLR-9376.txt
##########
@@ -0,0 +1,21 @@
+TO BE DROPPED INTO CHANGES.txt (and possibly `solr-upgrade-notes.adoc`?)
+FOR WHATEVER VERSION THIS ULTIMATELY LANDS IN:
+
+Upgrade Notes

Review comment:
       put in `major-changes-in-solr-9.adoc`; not its own file.

##########
File path: 
solr/core/src/java/org/apache/solr/response/transform/DocTransformer.java
##########
@@ -52,6 +53,21 @@ public void setContext( ResultContext context ) {
 
   }
 
+  /**
+   * If this transformer wants to bypass escaping in the {@link 
org.apache.solr.response.TextResponseWriter} and
+   * write content directly to output for certain field(s), the names of any 
such field(s) should be returned
+   *
+   * NOTE: normally this will be conditional on the `wt` param in the request, 
as supplied to the
+   * {@link DocTransformer}'s parent {@link TransformerFactory} at the time of 
transformer creation.
+   *
+   * @return Collection containing field names to be written raw, or 
<code>null</code> if no field names should
+   * be written raw. Any collection returned collection need not be externally 
modifiable -- i.e.,
+   * {@link java.util.Collections#singleton(Object)} is acceptable.
+   */
+  public Collection<String> getRawFields() {

Review comment:
       There doesn't seem to be a semantic difference in null vs an empty 
collection, and it would be clearer to return non-null so maybe let's just do 
that?

##########
File path: 
solr/core/src/java/org/apache/solr/response/transform/DocTransformers.java
##########
@@ -49,6 +50,18 @@ public String getName()
     return str.toString();
   }
 
+  @Override
+  public Collection<String> getRawFields() {
+    Collection<String> fields = new ArrayList<>(size());

Review comment:
       this begs to be implemented using Java streams (including flatten).  
Just a thought.




-- 
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: issues-unsubscr...@solr.apache.org

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

Reply via email to