开发者

Solr How to delete all records EXCEPT ones in an array?

开发者 https://www.devze.com 2023-01-11 10:45 出处:网络
I have a SolrPhpClient which I use to communicate with Solr. I can make queries very easy, like: $solr->deleteByQuery(\"id: 12345\")

I have a SolrPhpClient which I use to communicate with Solr.

I can make queries very easy, like:

    $solr->deleteByQuery("id: 12345")

Anyways, I开发者_JAVA百科 wonder if anybody out there know of a way to delete all records in a Solr index EXCEPT ones I have inside an array...

Is this even possible...

Thanks


$solr->deleteByQuery("*:* -id:(12345 OR 12346 OR 12347)")
0

精彩评论

暂无评论...
验证码 换一张
取 消