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

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

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 boolean operator