views:

33

answers:

1

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

I can make queries very easy, like:

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

Anyways, I 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

+2  A: 
$solr->deleteByQuery("*:* -id:(12345 OR 12346 OR 12347)")
Mauricio Scheffer