is it possible to delete documents via the Patch API / Raven Management studio?

360 views
Skip to first unread message

Karl Cassar

unread,
Apr 9, 2013, 11:10:13 AM4/9/13
to rav...@googlegroups.com
Can you delete a document by using the 'Patch' tab in the raven studio?

I tried the below patch script:

if (this.Identifier == "TEST123")
{
delete this;
}

But an 'InvalidOperationException' was returned.  If it can be done, what is the syntax?

Regards,
Karl

Oren Eini (Ayende Rahien)

unread,
Apr 9, 2013, 2:19:24 PM4/9/13
to ravendb
You can't delete documents via the patch API.
You can delete them via the DeleteByIndex, however, and that gives you much better approach for that.


--
You received this message because you are subscribed to the Google Groups "ravendb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Wallace Turner

unread,
Oct 16, 2014, 6:34:33 PM10/16/14
to rav...@googlegroups.com
It should also be noted that you can also delete them simply by querying them in the index (under the Query tab in the studio) and then selecting all the documents and right clicking Delete


Wallace Turner

unread,
Jul 13, 2015, 12:00:19 AM7/13/15
to rav...@googlegroups.com
or even better there is a button to 'delete all documents resulting from this query'

Oren Eini (Ayende Rahien)

unread,
Jul 13, 2015, 3:02:35 AM7/13/15
to ravendb
That is from a year ago.

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.

To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages