vinayakphegde commented on code in PR #1448:
URL: https://github.com/apache/solr/pull/1448#discussion_r1133628760


##########
solr/core/src/java/org/apache/solr/handler/loader/XMLLoader.java:
##########
@@ -416,6 +423,21 @@ public SolrInputDocument readDoc(XMLStreamReader parser) 
throws XMLStreamExcepti
               doc.addField(name, readDoc(parser));
               break;
             }
+            for (int i = 0; i < parser.getAttributeCount(); i++) {
+              attrName = parser.getAttributeLocalName(i);
+              attrVal = parser.getAttributeValue(i);
+              if (NAME.equals(attrName)) {
+                isSingleLabeledChildDoc = true;
+                doc.addField(attrVal, readDoc(parser));
+                break;

Review Comment:
   but we are not concerned about other attributes, right? before this, we were 
skipping all the attributes
   does it make sense to repeat the `name` attribute? is there any use case for 
that?



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