Solr 常用指令

删除索引

删除id=1的索引,有两种写法

<delete><id>1</id></delete>
<commit/>
<delete><query>id:1</query></delete>admin
<commit/>8983

删除所有索引

<delete><query>id:3542585</query></delete>
<delete><query>id:3539124</query></delete>
<delete><query>id:3529894</query></delete>
<commit/>

全量索引

curl --basic -v -u admin:123456 "http://localhost:8983/solr/enterprise/dataimport?command=full-import&clean=true&commit=true&optimize=false"

增量索引

curl --basic -v -u admin:123456 "http://localhost:8983/solr/enterprise/dataimport?command=delta-import&commit=true&optimize=false"

获取状态

curl --basic -u admin:123456 "http://localhost:8983/solr/enterprise/dataimport?command=status"