How do I delete all data from solr
by command? We are using solr
with lily
and hbase
.
How can I delete data from both hbase and solr?
http://lucene.apache.org/solr/4_10_0/tutorial.html#Deleting+Data
Deleting All Documents Just like deleting a specific field, if you want to delete all the documents from an index, you just need to pass the symbol “:” between the tags <query></ query>, as shown below. Save it as delete_all. xml and perform the delete operation on the core named my_core using the post tool of Solr.
Options for the solr delete command For the solr delete command the -c <name> option is required while the other options (parameters) are optional. Delete the named Solr core or collection with default options. Solr will delete the specified core and its associated configuration files at the first port number found.
There is no process in Solr for programmatically reindexing data. When we say "reindex", we mean, literally, "index it again". However you got the data into the index the first time, you will run that process again.
If you want to clean up Solr index -
you can fire http url -
http://host:port/solr/[core name]/update?stream.body=<delete><query>*:*</query></delete>&commit=true
(replace [core name]
with the name of the core you want to delete from). Or use this if posting data xml data:
<delete><query>*:*</query></delete>
Be sure you use commit=true
to commit the changes
Don't have much idea with clearing hbase data though.
I've used this request to delete all my records but sometimes it's necessary to commit this.
For that, add &commit=true
to your request :
http://host:port/solr/core/update?stream.body=<delete><query>*:*</query></delete>&commit=true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With