How to delete all data from solr and hbase

How to delete all data from solr and hbase

If you want to clean up Solr index –

n

you can fire http url –

n

http://host:port/solr/[core name]/update?stream.body=<delete><query>*:*</query></delete>&commit=truen

n

(replace [core name] with the name of the core you want to delete from). Or use this if posting data xml data:

n

<delete><query>*:*</query></delete>n

n

Be sure you use commit=true to commit the changes

n

Dont have much idea with clearing hbase data though.

Ive used this request to delete all my records but sometimes its necessary to commit this.

n

For that, add &commit=true to your request :

n

http://host:port/solr/core/update?stream.body=<delete><query>*:*</query></delete>&commit=truen

How to delete all data from solr and hbase

Post json data (e.g. with curl)

n

curl -X POST -H Content-Type: application/json \n    http://<host>:<port>/solr/<core>/update?commit=true \n    -d { delete: {query:*:*} }n

Leave a Reply

Your email address will not be published.