: I've created a custom process in Solr that has a Zookeeper Watcher : configured to pull Solr XML files from a znode. When I receive a file I can : send the file to /update and get it indexed, but that seems inefficient. I : could use SolrJ, but I believe that is still sending an HTTP request to : /update. Is there a better way to do this, or is SolrJ running w/in the : same servlet container the most efficient way to index SolrJ from w/in the : same servlet container that is running Solr?
you could use the stream.file option to have the UpdateRequestHandler pull the data fro ma local file path, but i'm not sure that would really be much faster. Alternatively you couuld call out directly to hte XMLLoader to parse it into SolrInputDocument objects and send them directly to the UpdateRequestProcessorChain - depends on how much of hte abstraction you want to bypass (ie: if you want to be able to parse multiple types of files, you're probably better off talking to hte request handler) Actually -- using a LocalSolrQueryRequest object where you setup a ContentStream pointed at the local file might be the method with the least amount of overhaed and the most flexibility. -Hoss