title: Raven DB: How can I delete all documents of a given type
body: <p>More specifically in Raven DB, I want to create a generic method with a signature like;</p>
  
  <pre><code>public void Clear&lt;T&gt;() {...
  </code></pre>
  
  <p>Then have Raven DB clear all documents of the given type.</p>
  
  <p>I understand from other posts by Ayende to similar questions that you'd need an index in place to do this as a batch.</p>
  
  <p>I think this would involve creating an index that maps each document type - this seems like a lot of work.</p>
  
  <p>Does anyone know an efficient way of creating a method like the above that will do a set delete directly in the database?</p>