lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: Lucene index files from two different applications.
Date Tue, 21 Dec 2004 11:09:21 GMT

On Dec 21, 2004, at 5:51 AM, Gururaja H wrote:
> 1.  Can two applications write index files, in the same directory, at 
> the same time ?

If you mean to the same Lucene index, the answer is no.  Only a single 
IndexWriter instance may be writing to an index at one time.

> 2.  If two applications cannot write index files, in the same 
> directory, at the same time.
>      How should we resolve this ?  Would appriciate any solutions to 
> this...

You may consider writing a queuing system so that two applications 
queue up a document to index, and a single indexer application reads 
from the queue.  Or the applications could wait until the index is 
available for writing.  Or...

> 3.  My thought is to write the index files in two different 
> directories and read both the indexes
> (as though it forms a single index, search results should consider the 
> documents in both the indexes) from the WebApplication.  How to go 
> about implementing this, using Lucene API ?  Need inputs on which of 
> the Lucene API's to use ?

Lucene can easily search from multiple indexes using MultiSearcher.  
This merges the results together as you'd expect.

	Erik


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


Mime
View raw message