lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: Complete re-indexing using lucene
Date Thu, 18 Apr 2013 19:59:05 GMT
Just pass IndexWriterConfig.OpenMode.CREATE when you open the index on
the same location ... this will make IndexWriter remove the existing
index.

Mike McCandless

http://blog.mikemccandless.com

On Thu, Apr 18, 2013 at 3:33 PM, Sandeep Jangra <sandeepjangra@gmail.com> wrote:
> Hi,
>
>   I am using lucene in my project built in java.
>   I am writing the index to a file using FSDirectory.open("c:\\temp").
>
>   Every hour boundary I need to re-index the complete system.
>   But if I use the same directory "c:\\temp" for re-indexing, the directory
> size will grow eventually because of new segments being created every hour.
>
>   Does lucene provide a clean way for handling this or would I have to
> handle it in my application by having new index location.
>
>   Please let me know and Thanks in advance for the help!

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message