On Mar 14, 2008, at 2:23 PM, peter360 wrote:
Thanks for your suggestion and I pretty much agree. Part of the
reason,
which I didn't mention in my original question, that I am looking
for a
command line tool is to use it for quick diagnosis. I could point
it to a
different index just by changing one of the command line
parameters, without
having to modify the solrconfig.xml file and restart a servlet
container,
then go to a browser to issue query.
For the record, you can point to a different index with Solr with a
command-line startup parameter (provided you have the directory in
solrconfig parameterized this way): <dataDir>${solr.data.dir:./solr/
data}</dataDir>
java -Dsolr.data.dir=some/other/directory -jar start.jar
Startup time for Solr is a few seconds max for me.
And no browser needed:
curl "http://localhost:8983/solr/select?q=whatever&wt=ruby&indent=on"
(ruby and indentation enabled for readability in a console).
Erik