Deleting solr indexes

This post was written by Mahi-Bhat on October 19, 2013
Posted Under: Online Groups,Uncategorized

Using solr admin utility

1. Open http://localhost:8983/solr using a browser

2. Select the core from drop down menu

3. Click on Documents link from left bar navigation

4. Select ‘Solr Command (raw XML or JSON)’ from Document Type drop down

5. Enter *:* in text area box and click Submit Document

6. Enter in text area box and click Submit Document

7. For 4 & 5 check the Status message at the right side of the page

Using linux command line

curl http://localhost:8983/solr/update –data ‘*:*‘ -H ‘Content-type:text/xml; charset=utf-8’
curl http://localhost:8983/solr/update –data ‘‘ -H ‘Content-type:text/xml; charset=utf-8’

To delete selected document pass document ids or query instead of ‘*:*’

e.g:-
Deleting a single document
docid: (1)

Deleting multiple documents
docid: (2 3)

Reference

http://wiki.apache.org/solr/FAQ#How_can_I_delete_all_documents_from_my_index.3F

Add a Comment

required, use real name
required, will not be published
optional, your blog address