Github user dsmiley commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/430#discussion_r207741137
--- Diff:
solr/solrj/src/java/org/apache/solr/client/solrj/util/ClientUtils.java ---
@@ -114,17 +121,34 @@ private static void writeVal(Writer writer, String
name, Object v, String update
if (update == null) {
if (v != null) {
- XML.writeXML(writer, "field", v.toString(), "name", name );
+ if(v instanceof SolrInputDocument) {
+ OutputStream os = SolrInputDocumentXmlOutput((SolrInputDocument)
v);
+ XML.writeXML(writer, "field", false, os.toString(), "name",
name);
+ } else {
+ XML.writeXML(writer, "field", v.toString(), "name", name );
+ }
}
} else {
if (v == null) {
XML.writeXML(writer, "field", null, "name", name, "update",
update, "null", true);
} else {
+ if(v instanceof SolrInputDocument) {
+ OutputStream os = SolrInputDocumentXmlOutput((SolrInputDocument)
v);
+ XML.writeXML(writer, "field", false, os.toString(), "name",
name, "update", update);
+ }
XML.writeXML(writer, "field", v.toString(), "name", name,
"update", update);
}
}
}
+ private static OutputStream SolrInputDocumentXmlOutput(SolrInputDocument
v) throws IOException {
--- End diff --
Never start a method name with an uppercase letter.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]