You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Jeff Munson <jm...@newspaperarchive.com> on 2004/10/19 17:34:36 UTC

MultiSearcher object question

I've just indexed over 600,000 documents (index size = 12GB) and have a
simple servlet to search the index.  I am using the MultiSearcher object
(I will add more indexes in the future) in a servlet to test searching.
I have noticed that the instantiation of my MulitSearcher object is
taking about 5 seconds.  As a solution, I have created the MultiSearcher
object and stored it in the Application context so I create it once and
access it subsequent times.  

My question is, is this a recommended practice?  If I have 1000 users
concurrently searching, will this approach cause problems?  What do
others do in web applications using the MultiSearcher object? 

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


RE: MultiSearcher object question

Posted by Aviran <am...@infosciences.com>.
As long as the index has not changed you should reuse the same searcher, and
not instantiate a new one every time.

Aviran
http://aviran.mordos.com

-----Original Message-----
From: Jeff Munson [mailto:jmunson@newspaperarchive.com] 
Sent: Tuesday, October 19, 2004 11:35 AM
To: lucene-user@jakarta.apache.org
Subject: MultiSearcher object question


I've just indexed over 600,000 documents (index size = 12GB) and have a
simple servlet to search the index.  I am using the MultiSearcher object (I
will add more indexes in the future) in a servlet to test searching. I have
noticed that the instantiation of my MulitSearcher object is taking about 5
seconds.  As a solution, I have created the MultiSearcher object and stored
it in the Application context so I create it once and access it subsequent
times.  

My question is, is this a recommended practice?  If I have 1000 users
concurrently searching, will this approach cause problems?  What do others
do in web applications using the MultiSearcher object? 

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


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