On Sep 20, 2005, at 2:24 AM, Magne Skjeret wrote:
I am using lucene to index all my data, and it is working just great.

I will now add search to a web application, so the index can actually be
used, not just sit there.

Good idea... it'd be a shame for the index to sit unsearched!  :)

1. Can a search be performed while the index is beeing updated (add/ delete)?

Yes, no problem with searches occurring during add/delete operations. The searches will not see new documents and still return deleted documents until a new IndexSearcher instance is used, though.

2. Should I create a IndexSearcher for each search?
Or should I have 1 IndexSearcher for everyone? If, it is threadsafe,
or do I queue? Or should I create a pool of IndexSearchers?

For best performance, use a single IndexSearcher instance across your entire application.

3. Do I need to close the IndexSearcher while or after a index update
operation?

When you want index changes to be visible to searches, drop the old IndexSearcher instance and instantiate a new one.

    Erik


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

Reply via email to