tags:

views:

1552

answers:

1

How do I pick/ delete all the documents from Solr using the boolean NOT notion?

i.e. How do I delete all the documents from Solr who's id does NOT start with A59?

+3  A: 

Use '-' to indicate NOT.

For example, to query documents with id not starting with A59, the query would be: -id:A59*, that is: /solr/select/?q=-id:A59*

To delete by query, post the query in a delete message to the update handler, as specified here.

EDIT: NOT (all uppercase) can also be used as operator

Mauricio Scheffer