lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Powers" <>
Subject RE: Basic lucene usage
Date Thu, 22 Dec 2005 20:39:32 GMT
If you open an indexsearcher and keep a single indexsearcher open for
all sessions to use, then can an indexwriter delete the files and create
the new files as needed?    

To start an indexsearcher, you pass in the directory.  Doesn't that tie
the searcher to the files?  So an indexwriter couldn't come along and
reindex (delete and recreate) the directory while the searcher has a
hold of those files..correct?

So if I have a single indexsearcher, if I want to recreate the index, I
would have to stop the indexsearcher, go through creating the index,
then get a new fsdirectory for a new indexsearcher, correct?

-----Original Message-----
From: Mordo, Aviran (EXP N-NANNATEK) [] 
Sent: Tuesday, December 06, 2005 12:19 PM
Subject: RE: Basic lucene usage

Lucene is thread safe, it is recommended that you only have one
IndexSearcher instance. No problems with multiple searches on the same

You can index while searching, as soon as you want the new entries to be
found by the IndexSearcher, just get a new instance of IndexSearcher


-----Original Message-----
From: John Powers [] 
Sent: Tuesday, December 06, 2005 1:13 PM
Subject: Basic lucene usage

Am I correct in assuming that I can use lucene by itself as a search
in a website?   If each user session is looking at the fsdirectory and
searching on it, is that ok?   Or do I need to put in a queue or pool
handles searching it; only allowing the one thing application-wide to
actually get to the fsdirectory?    Can 100 people look at the
at the same time?  Or do you generally put in a single entry point that
queues requests for a search from those 100 people?

And I guess I have the same question about writing/indexing.  Locks are
creating as apart of the indexing process, correct?  So you'd definitly
not want multiple people doing that at the same time?  What is the best
to stop that?   

Are locks created as apart of searching?

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