CLOVER🍀

That was when it all began.

Apache Solr 5.xで、curl×JSONでドキュメントを一括削除する

以下のコマンドで。

$ curl -H 'Content-Type: application/json' 'http://localhost:8983/solr/[コア名]/update?commit=true' -d '{ delete: { query: "*:*" }}'

Content-Typeの部分は削っても動きましたけど、一応付与することにします。
※削った版は以下

$ curl 'http://localhost:8983/solr/[コア名]/update?commit=true' -d '{ delete: { query: "*:*" }}'