I guess what I meant was to have all your servlets use the same
instance.  They could get it from the class or from a parent of all your
servlets.   Then you can let the indexsearcher take care of all the
search requests.

-----Original Message-----
From: Gus Kormeier [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 22, 2006 12:42 PM
To: 'java-user@lucene.apache.org'
Subject: RE: IndexSearcher

It's in a servlet, so one work around I have been going with is to just
open
it at init().  That gives me some threading concerns.

And I didn't have to do that in the past,
-Gus

-----Original Message-----
From: John Powers [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 22, 2006 9:35 AM
To: java-user@lucene.apache.org
Subject: RE: IndexSearcher


This doesn't really address your question, but...

Once you have the single indexsearcher, do you need any others?   Could
your app just use the single instance?  

-----Original Message-----
From: Gus Kormeier [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 22, 2006 11:28 AM
To: java-user@lucene.apache.org
Subject: IndexSearcher

Maybe too general a question, but is there anything about creating an
IndexSearcher( directory) object that would make the instantiation
really
slow?


I have one index where the instantiation is very fast, to the point
where I
don't need to do any pooling.  A new index I have created, takes a very
long
time to create the IndexSearcher object.  With a 30mb index, it can take
about 30 seconds just to instantiate an IndexSearcher().  It almost
seems
like it is reading the index at that point.


The only difference between the indexes has been the # of fields
indexed.
The newer one only having one field indexed.

Any ways to speed up that instantiation? Or do I have to use a pooling
system?

Thanks for any suggestions,
-Gus

---------------------------------------------------------------------
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]

---------------------------------------------------------------------
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]

Reply via email to