Github user dsmiley commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/430#discussion_r207884074
--- Diff: solr/core/src/java/org/apache/solr/handler/loader/XMLLoader.java
---
@@ -453,7 +454,12 @@ public SolrInputDocument readDoc(XMLStreamReader
parser) throws XMLStreamExcepti
}
break;
}
- doc.addField(name, v);
+ if(!isLabeledChildDoc){
+ // do not add empty data if a labeled child document was
added
--- End diff --
Maybe this could be clarified some; I find it confusing. If at this point
we're *not* a labelled child doc, then yes add a value (it won't be empty; yet
the comment suggests it is). Maybe your comment goes in the "else" section?
It may be simpler to read if we avoid the negation -- do an
if(isLabeledChildDoc) and else not labelled child doc. It appears setting
isLabeledChildDoc=false is a "reset" action of sorts; maybe say that.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]