On Apr 2, 2009, at 8:47 AM, Akshay wrote:
On Thu, Apr 2, 2009 at 5:58 PM, Neha Bhardwaj <
neha_bhard...@persistent.co.in> wrote:
Hi,
I want to index through commond line
How to do that?
You can use curl,
http://wiki.apache.org/solr/UpdateXmlMessages?highlight=%28curl%29#head-c614ba822059ae20dde5698290caeb851534c9de
Or Solr's post.jar, setting the url parameter appropriately:
$ java -jar post.jar -help
SimplePostTool: version 1.2
This is a simple command line tool for POSTing raw XML to a Solr
port. XML data can be read from files specified as commandline
args; as raw commandline arg strings; or via STDIN.
Examples:
java -Ddata=files -jar post.jar *.xml
java -Ddata=args -jar post.jar '<delete><id>42</id></delete>'
java -Ddata=stdin -jar post.jar < hd.xml
Other options controlled by System Properties include the Solr
URL to POST to, and whether a commit should be executed. These
are the defaults for all System Properties...
-Ddata=files
-Durl=http://localhost:8983/solr/update
-Dcommit=yes