Delete All

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Delete All

gsingers
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 
Reply | Threaded
Open this post in threaded view
|

Re: Delete All

Yonik Seeley
On 6/9/06, Grant Ingersoll <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: Delete All

Chris Hostetter-3

: 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