Hi Robert,

You can find an example of something similar to this in the examples that are part of the solr distribution. The tutorial ( http://lucene.apache.org/solr/tutorial.html) describes how to post data to the solr server via the post.jar

user:~/solr/example/exampledocs$ *java -jar post.jar solr.xml monitor.xml*

If you take a look at the solr.xml file, you will see

<add>
<doc>
<field name="id">SOLR1000</field>
<field name="name">Solr, the Enterprise Search Server</field>
</doc>
</add>

I think you can post your delete query to the server in the same way.

Hope this helps.

-Daniel


We are just staring with Solr and have a multi core implementation and need to 
delete all the rows in the index to clean things up.

When running an update via a url we are using something like the following 
which works fine:
http://localhost:8983/solr/template/update/csv?commit=true&escape=\&stream.file=/opt/TEMPLATE_DATA.csv

Not clear on how to delete all the rows in this index. The documentation gives 
this example:
<delete><query>timestamp:[* TO NOW-12HOUR]</query></delete>

I'm not clear on the context of this command - is this through the Solr admin 
or can you run this via the restful call?

Trying to add this to a restful call does not work like this attempt:
http://localhost:8983/solr/template/<delete><query>timestamp:[* TO 
NOW-12HOUR]</query></delete>

Any thoughts appreciated.

Bob



Reply via email to