I have the following call:
var Exists = Driver.DocumentExists<Mydata>(Id).Exists;
It checks if a document exists with the Id passed as a parameter. The call behaves as expected, however it throws some exceptions that get caught, but appear in the debugger on every call where a document is not found:
Exception: Exception thrown: 'System.Net.WebException' in System.dll ("The remote server returned an error: (404) Not Found."). Exception thrown: 'System.Net.WebException' in System.dll ("The remote server returned an error: (404) Not Found.")
(this is how it looks: http://imgur.com/a/kFIZP, pages and pages of this)
I have to do this for tens of thousands of documents; essentially I want to delete a large number of documents but I don't have all the IDs at once to make batch calls and since I need to perform other operations at the same time, I can't really batch things. Deleting without checking if the document exists triggers the same exception.
The exceptions are making the code run insanely slow in the debugger. Am I missing something, or is it the expected behavior?