vinayakphegde commented on code in PR #1448:
URL: https://github.com/apache/solr/pull/1448#discussion_r1133621381
##########
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;
+ } else {
+ log.warn("XML element <doc> has invalid XML attr: {}",
attrName);
+ }
+ }
+ if (isSingleLabeledChildDoc) {
+ isSingleLabeledChildDoc = false;
Review Comment:
true will do 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: [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]