Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If Solr is running, you can access the following URL from the server where Solr is installed (remember the default localhost restriction):

Code Block
$ curl "http://localhost:8080/solr/search/update?stream.body=<delete><query>*:*</query></delete>"
$ curl "http://localhost:8080/solr/search/update?commit=true -d '<delete><query>*:*</query></delete>'

 

solr/search/update?stream.body=<commit/>"

This will delete all documents in the search (Discovery) core.

You can verify the number of documents in the core by running the following query and checking the value of the numFound attribute in the output:

Code Block
$ curl "http://localhost:8080/solr/search/select/?q=*:*&rows=0"
<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader"><int name="status">0</int><int name="QTime">5</int><lst name="params"><str name="rows">0</str><str name="q">*:*</str></lst></lst><result name="response" numFound="0" start="0"/>
</response>

The URL listed in the examples is the default Solr URL in DSpaceThis is the default URL for Solr. If you changed it, you can find it in search.server in [dspace]/config/modules/discovery.cfg (DSpace 1.8+) or in solr.log.server in [dspace]/config/dspace.cfg (DSpace 1.7).

Source: Solr Wiki FAQ: How can I delete all documents from my index?

Manually delete Solr index files

...