Re: Lucene index files from two different applications.

2004-12-21 Thread Sergiu Gordea
Gururaja H wrote:
Hi !
Have two applications.  Both are supposed
to write Lucene index files and the WebApplication is supposed to read
these index files.
Here are the questions:
1.  Can two applications write index files, in the same directory, at the same time ?
 

if you implement the synchronisation between these 2 applications, yes
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...
 

... se 1. and 3.
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 ?
 

If yor requirements allow you to create to independent indices, than you 
can use the MultiSearcher to search in both indices.
Maybe this will be the most cost effective solution in your case,

Best,
 Sergiu
 
Thanks,
Gururaja
__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Lucene index files from two different applications.

2004-12-21 Thread Erik Hatcher
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Lucene index files from two different applications.

2004-12-21 Thread Chuck Williams
Depending on what you are doing, there are some problems with
MultiSearcher.   See
http://issues.apache.org/bugzilla/show_bug.cgi?id=31841 for a
description of the issues and possible patch(es) to fix.

Chuck

   -Original Message-
   From: Erik Hatcher [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, December 21, 2004 3:09 AM
   To: Lucene Users List
   Subject: Re: Lucene index files from two different applications.
   
   
   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: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]