lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergiu Gordea <>
Subject Re: continous index update
Date Wed, 28 Jul 2004 10:59:00 GMT
you have to delete the documents using IndexReader and write the 
Documents using IndexWriter,
both of them place a lock on the index file, so ... you cannot work with 
both of them in the same time.
(you get errors when you have an opened IndexWriter and try to delete a 
document with an IndexWriter).

  I'm using lucene to index information I have in a database. Each time 
the records in database are modified, I delete
the document and I add it again. If you are working with threads, make 
sure that the instantiation and closing of IndexWriter and
IndexReaders are made in synchronized code.

 All the best,


jitender ahuja wrote:

>      I am working on Windows platform and I think it wouldn't work there.
>If it can, do please tell me.
>----- Original Message ----- 
>From: "Vladimir Yuryev" <>
>To: "Lucene Users List" <>
>Sent: Wednesday, July 28, 2004 3:17 PM
>Subject: Re: continous index update
>>I do automatic index update by cron daemon.
>>On Wed, 28 Jul 2004 15:05:46 +0530
>>  "jitender ahuja" <> wrote:
>>>Hi all,
>>>         I am trying to make an automatic index update file based o
>>>a background thread, but it gives errors in deleting the existing
>>>index, if (only if) the server accesses the index at the same time or
>>>has once accessed it and even if a different request is posed, i.e.
>>>for a different index directory or a different job, it makes no
>>>Can anyone tell that in such a continous update scenario, how the old
>>>index can be updated as I feel deletion is a must of the earlier
>>>contents so as to get the new contents in place.
>>To unsubscribe, e-mail:
>>For additional commands, e-mail:
>To unsubscribe, e-mail:
>For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message