lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Solr, cURL, and Java runtime
Date Sat, 02 Apr 2011 23:59:08 GMT
: 
: I'm experiencing something weird while trying to post updates to Solr docs
: via cURL from exec in Java runtime.  I can't figure out if this is something
: strange with Solr's update mechanism, cURL, or Java runtime oddities, so

There are so many frightening things in that sentence i don't even know 
where to begin.

please don't do what you just described.  it's making me cry.

seriously -- that's a scary, overly complicated, brittle way to try to 
talk to Solr fro ma java app.  I could not bring myself to read any of 
your email passed that line because of how much it disturbed me.

Please consider using SolrJ.

If you really have some reason why you don't want to use SolrJ, then at 
least use some Java based HTTP library to talk to Solr.  the 
SimplePostTool code in solr's code base shows a really dirt simple example 
of using pure java to POST data to Solr.

Trying to use Runtime.exec with curl, with xml passed to curl on the 
commandline is just asking for a world of shell escaping non-portable pain 
... as you've already unconvered.


-Hoss

Mime
View raw message