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 spamsucks <sp...@rhoderunner.com> on 2007/02/07 17:42:21 UTC

Increase performance using Pool of IndexSearchers?

I currently am sharing my IndexSearcher across multiple requests as a static 
object.

While I understand that the IndexSearcher is threadsafe, this does not 
necessarily mean that it's multi-threaded capable.  I was wondering if there 
is any thread blocking going on between requests?

Would it improve performance to create a pool of IndexSearchers?

Thanks!





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


Re: Increase performance using Pool of IndexSearchers?

Posted by Phillip Rhodes <sp...@rhoderunner.com>.
Mohammad,
According to the responses on this thread, there appears to be no 
performance benefit to using multiple instances of IndexSearcher

Unless I hear otherwise, there is no point in creating such a pool.
Phillip

Mohammad Norouzi wrote:

> Hi
> would you tell how we can create a searcher pool. I get interested in 
> your
> idea.
>
> thanks
>
> On 2/7/07, spamsucks <sp...@rhoderunner.com> wrote:
>
>>
>> I currently am sharing my IndexSearcher across multiple requests as a
>> static
>> object.
>>
>> While I understand that the IndexSearcher is threadsafe, this does not
>> necessarily mean that it's multi-threaded capable.  I was wondering if
>> there
>> is any thread blocking going on between requests?
>>
>> Would it improve performance to create a pool of IndexSearchers?
>>
>> Thanks!
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>
>



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


Re: Increase performance using Pool of IndexSearchers?

Posted by Mohammad Norouzi <mn...@gmail.com>.
Hi
would you tell how we can create a searcher pool. I get interested in your
idea.

thanks

On 2/7/07, spamsucks <sp...@rhoderunner.com> wrote:
>
> I currently am sharing my IndexSearcher across multiple requests as a
> static
> object.
>
> While I understand that the IndexSearcher is threadsafe, this does not
> necessarily mean that it's multi-threaded capable.  I was wondering if
> there
> is any thread blocking going on between requests?
>
> Would it improve performance to create a pool of IndexSearchers?
>
> Thanks!
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>


-- 
Regards,
Mohammad

Re: Increase performance using Pool of IndexSearchers?

Posted by Simon Willnauer <si...@googlemail.com>.
On 2/7/07, spamsucks <sp...@rhoderunner.com> wrote:
> I currently am sharing my IndexSearcher across multiple requests as a static
> object.
static or not a single / shared searcher is a good idea.

>
> While I understand that the IndexSearcher is threadsafe, this does not
> necessarily mean that it's multi-threaded capable.  I was wondering if there
> is any thread blocking going on between requests?
No there are no blocking method as long as you use your Searcher e.g.
the IndexReader for reading/searching. IndexReader has several
synchronized methods but these are write access methods and commit.
>
> Would it improve performance to create a pool of IndexSearchers?
As far as I know no! It would rather slow down you app. while you have
to open the index and warm up caches if you have updates or deletes
you want to make visible for searching.

best regards Simon
>
> Thanks!
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

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