Sunday, January 13, 2019

Delete all documents from Solr

How can I delete all documents from my index? documented on wiki shows the following commands which can be executed in the browser:
http://localhost:8983/solr/update?stream.body=<delete><query>*:*</query></delete>
http://localhost:8983/solr/update?stream.body=<commit/>
While trying to execute the same in SolrCloud 7.6, you get the message that stream.body is disabled.
RequestDispatcher shows the command to configure remote streaming.  Following is the command:
curl -H 'Content-type:application/json' -d '{"set-property": {"requestDispatcher.requestParsers.enableRemoteStreaming": true}, "set-property":{"requestDispatcher.requestParsers.enableStreamBody": true}}' http://localhost:8983/api/collections/

No comments:

Post a Comment