solr删除所有索引信息
http://wiki.apache.org/solr/FAQUse the "match all docs" query in a delete by query command: <delete><query>*:*</query></delete>
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; charset=utf-8'
Another strategy would be to add two bookmarks in your browser:
http://localhost:8080/solr/update?stream.body=<delete><query>*:*</query></delete>
http://localhost:8080/solr/update?stream.body=<commit/>
And use those as you're developing to clear out the index as necessary.
页:
[1]