Solr How to delete all EXCEPT entries in an array?

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

I can make queries very easy, for example:

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

In any case, I wonder if anyone knows how to delete all the entries in the Solr EXCEPT index that I have inside the array ...

Is it possible...

thank

+3
source share
1 answer
$solr->deleteByQuery("*:* -id:(12345 OR 12346 OR 12347)")
+6
source

Source: https://habr.com/ru/post/1759790/


All Articles