1. 程式人生 > >13.5.SolrCloud集群使用手冊之數據導入

13.5.SolrCloud集群使用手冊之數據導入

delete text -- bin 數據導入 charset strong cloud clean

轉載請出自出處:http://www.cnblogs.com/hd3013779515/

1.使用curl命令方式

SolrCloud時會根據路由規則路由到各個shard。

刪除所有數據

curl http://192.168.137.171:8080/solr-cloud/myc_shard1_replica1/update?commit=true -H "Content-Type: text/xml" --data-binary "<delete><query>*:*</query></delete>"

導入XML文檔數據

curl http://192.168.137.171:8080/solr-cloud/myc_shard1_replica1/update?commit=true --data-binary @/home/test/student.xml -H ‘Content-type:text/xml; charset=utf-8‘

導入json文檔數據

curl http://192.168.137.171:8080/solr-cloud/myc_shard1_replica1/update?commit=true --data-binary @/home/test/student.json -H ‘Content-type:application/json; charset=utf-8‘

導入csv文檔數據

curl http://192.168.137.171:8080/solr-cloud/myc_shard1_replica1/update?commit=true --data-binary @/home/test/student.csv -H ‘Content-type:text/csv; charset=utf-8‘

2. DIH全量增量同步Mysql數據

DIH全量導入

http://192.168.137.171:8080/solr-cloud/myc_shard1_replica1/dataimport?command=full-import&commit=true&clean=true

DIH增量導入

http://192.168.137.171:8080/solr-cloud/myc_shard1_replica1/dataimport?command=delta-import

13.5.SolrCloud集群使用手冊之數據導入