If you kept an "indexed_time" field, you could always just index
to the same instance and then do a delete by query, something like
<delete><query>timestamp:[* TO NOW/DAY]</query></delete>,
commit and go. That would delete everything indexed before midnight.
last night (NOW/DAY rounds down).

Note, most of this would be already replaced if your new documents
had the same <uniqueKey> value as the old ones, then the old ones
would be automatically replaced.

Best
Erick


On Tue, Mar 5, 2013 at 12:10 AM, 장용석 <need4...@gmail.com> wrote:

> Hi.
>
> I want indexing all documents once a day and after indexing delete old
> index files that indexed before a day.
>
> I think to do this, indexing all documents in new directory and replace
> IndexSearcher and IndexWriter with olds, and delete old index directory.
>
> Is there more good indexing strategy?
>
> Thanks.!
>
> --
> DEV용식
> http://devyongsik.tistory.com
>

Reply via email to