lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Solr Wiki] Update of "FAQ" by AnthonyJBurton
Date Sun, 26 Aug 2012 18:50:07 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "FAQ" page has been changed by AnthonyJBurton:

adds a bit more pracitcal information on how to delete/clear an index

  == How can I delete all documents from my index? ==
  Use the "match all docs" query in a delete by query command: {{{<delete><query>*:*</query></delete>}}}
- This has been optimized to be more efficient then deleting by some arbitrary query which
matches all docs because of the nature of the data.
+ You must also commit after running the delete so, to empty the index, run the following
two commands:
+ {{{
+ curl http://localhost:8983/solr/update --data '<delete><query>*:*</query></delete>'
-H 'Content-type:text/xml; charset=utf-8'  
+ curl http://localhost:8983/solr/update --data '<commit/>' -H 'Content-type:text/xml;
+ }}}
+ Another strategy would be to add two bookmarks in your browser:
+ {{{
+ http://localhost:8983/solr/update?stream.body=<delete><query>*:*</query></delete>
+ http://localhost:8983/solr/update?stream.body=<commit/>
+ }}}
+ And use those as you're developing to clear out the index as necessary.
  == How can I rebuild my index from scratch if I change my schema? ==
   1. Use the "match all docs" query in a delete by query command before shutting down Solr:

View raw message