If you are using solr 1.2 the following command (followed by a commit / optimize) should do the trick:
<delete><query>*:*</query></delete> cheers, Piete On 21/08/07, Sundling, Paul <[EMAIL PROTECTED]> wrote: > > what is the best approach to clearing an index? > > The use case is that I'm doing some performance testing with various > index sizes. In between indexing (embedded and soon HTTP/XML) I need to > clear the index so I have a fresh start. > > What's the best approach, close the index and delete the files? Hack > together some query that will match all documents and delete by query? > Looking at the Lucene API it looks like they have the same functionality > that is exposed already (delete by id or query). > > Paul Sundling > >