如何从solr和hbase中删除所有数据
hbase删除数据比较简单,truncate一下就行。solr删除所有数据,可以参考:CloudSolrClient client = new CloudSolrClient.Builder().withZkChroot(zkroot).withZkHost(zkhost).build());UpdateResponse response = client.deleteByQuery(collection,'f9_i:[0 TO 5]');System.out.println(response);命令行方式可以参考:curl -X POST -H 'Content-Type: application/json''http://localhost:8983/solr/my_collection/update' --data-binary '{'delete': { 'query':':' } / delete by query all /}'
赞0
踩0