lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From moshebla <...@git.apache.org>
Subject [GitHub] lucene-solr pull request #430: SOLR-12485: support labelled children in xml ...
Date Mon, 06 Aug 2018 13:33:06 GMT
Github user moshebla commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/430#discussion_r207892278
  
    --- 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 --
    
    I added this since for some odd reason after parsing the child document, the parser would
return a string with 2 spaces(the indent) and add that to the field value list.
    Yes setting the isLabeledChildDoc=false is a way to reset so the behaviour with non child
document values won't change.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message