lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <>
Subject RE: Transactional Indexing
Date Thu, 29 Nov 2001 16:57:46 GMT
> From: New, Cecil (GEAE) []
> I have noticed that when I kill/interrupt an indexing process, that it
> leaves a "lock" file, preventing further indexing.
> This raises a couple of questions:
> a. When I simply delete the file and restart the indexing, it 
> seems to work.
> Is there a risk in doing this?

No, there is no risk.  The index is never inconsistent, so long as only a
single process is modifying it.  Removing lock files is the standard
crash-recovery method for Lucene.

> b. Can indexing be done in a concurrent fashion?  For 
> example, allowing
> multiple uploading of files over the web and doing 
> incremental indexing as
> they arrive.  In this situation, you may have several 
> documents that need to
> be indexed simultaneously.

Lucene only supports index modification by a single process and using a
single IndexWriter object.  However, the index update code is thread safe,
so that many threads may use the same IndexWriter instance concurrently to
add documents.


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

View raw message