I need to delete a bunch of documents programmatically. I can use the javascript "patch" feature in the UI to find these documents, and to add a property to identify them, like so:
if (__document_id.indexOf("baddata") > 0) {
this.'MakeThisGoAway' = true;
}
But I can't find a way to delete documents in a "patch". (By design I assume)
From Raven docs it looks like the right way to do this is a DELETE request via curl, as described here: https://ravendb.net/docs/article-page/3.5/http/client-api/commands/documents/how-to/delete-or-update-documents-using-index with a request like:
curl -X DELETE "http://localhost:8080/databases/NorthWind/bulk_docs/Raven/DocumentsByEntityName?&query=Tag%3AShops&allowStale=false"
But the only examples are for deleting all documents in a collection. It looks like I should be able to include a query like "propertyname=MakeThisGoAway&value=true" but I can't find anything in the docs on how specifically that works. Am I missing something?