我需要以编程方式删除一堆文档。我可以使用JavaScript的“补丁”功能在界面中找到这些文件,并添加属性来识别它们,就像这样:如何删除某个属性的所有RavenDB文档
if (__document_id.indexOf("baddata") > 0) {
this.'MakeThisGoAway' = true;
}
但我不能找到一种方法来删除一个文件“补丁”。 (按设计我假设)
从乌鸦的文档,它看起来像要做到这一点是通过卷曲一个DELETE请求以正确的方式,如下所述:与请求等https://ravendb.net/docs/article-page/3.5/http/client-api/commands/documents/how-to/delete-or-update-documents-using-index:
curl -X DELETE "http://localhost:8080/databases/NorthWind/bulk_docs/Raven/DocumentsByEntityName?&query=Tag%3AShops&allowStale=false"
但唯一的例子用于删除集合中的所有文档。它看起来像我应该能够包括一个像“propertyname = MakeThisGoAway & value = true”的查询,但我无法找到有关具体如何工作的文档中的任何内容。我错过了什么吗?