On 6/2/2013 5:39 AM, Mysurf Mail wrote:
> I am running solr with two cores in solr.xml
> One is product (import from db) and one is collection1 (from the tutorial)
> 
> Now in order to clear the index I run
> 
> http://localhost:8983/solr/update?stream.body=<delete><query>*:*</query></delete
>>
> 
> http://localhost:8983/solr/update?stream.body=<commit/>
> 
> 
> only the "collection1" core (of the tutorial) is cleared.
> 
> How can I clear a specific index?
> 
> How can I clear all indice?

When you don't have the core name in the update URL, it will operate on
the core listed under defaultCoreName in solr.xml.  It is likely that
with the new style solr.xml, there will no longer be a defaultCoreName.
 This new format was introduced in the 4.3.0 release, will be properly
operational when 4.4 is released, and will be mandatory in 5.0.

http://wiki.apache.org/solr/Core%20Discovery%20%284.4%20and%20beyond%29

You should always include the core name in the URL:

http://localhost:8983/solr/product/update?stream.body=<delete><query>*:*</query></delete>
http://localhost:8983/solr/product/update?stream.body=<commit/>

There is no way from within Solr to clear all indexes.  In an external
piece of software, you can query /solr/admin/cores to get the full list
of cores, then clear them all individually.  Alternatively, you can
delete all the data/index directories and restart Solr.

Thanks,
Shawn

Reply via email to