You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Grant Ingersoll <gr...@yahoo.com> on 2006/06/10 02:34:54 UTC

Delete All

Was wondering if there is a delete all command that can be issued from via the POST?  I know I can delete individual documents, but from time to time I would like to nuke the whole index.

Thanks,
Grant
----
Grant Ingersoll
http://lucene.grantingersoll.com

 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Delete All

Posted by Chris Hostetter <ho...@fucit.org>.
: It could also be a special case of delete by query
:
: <delete><query>*:*</query></delete>
: <commit/>

if your schema has a uniqueKey field, then you can do...

  <delete><query>yourField:[* TO *]</query></delete>
  <commit/>


-Hoss


Re: Delete All

Posted by Yonik Seeley <ys...@gmail.com>.
On 6/9/06, Grant Ingersoll <gr...@yahoo.com> wrote:
> Was wondering if there is a delete all command that can be issued from via the POST?  I know I can delete individual documents, but from time to time I would like to nuke the whole index.

We have always just done a rm -rf index, and bounced  the server.
There should be some command to do this... but it should be named
appropriately so one could never plead ignorance:
<delete_complete_index/>
or
<i_really_do_want_to_remove_absolutely_everything_in_the_index/>  ;-)

It could also be a special case of delete by query

<delete><query>*:*</query></delete>
<commit/>

The *:* syntax isn't implemented in Lucene yet, but I always thought
it might be good for MatchAllDocsQuery

-Yonik