public void doLegacyUpdate(InputStream input, String inputContentType, Writer output) {
SolrCore core = SolrCore.getSolrCore();
SolrQueryRequest req = new LocalSolrQueryRequest(core, new HashMap<String,String[]>());
try {
// Old style requests do not choose a custom handler
UpdateRequestProcessorChain processorFactory = core.getUpdateProcessingChain(null);
SolrQueryResponse rsp = new SolrQueryResponse(); // ignored
final String charset = ContentStreamBase.getCharsetFromContentType(inputContentType);
final XMLStreamReader parser = (charset == null) ?
inputFactory.createXMLStreamReader(input) : inputFactory.createXMLStreamReader(input, charset);
UpdateRequestProcessor processor = processorFactory.createProcessor(req, rsp);
XMLLoader loader = (XMLLoader) newLoader(req, processor);
loader.processUpdate(processor, parser);
processor.finish();
output.write("<result status=\"0\"></result>");
}