does anybody have the experience to do some pooling upon lucene?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

does anybody have the experience to do some pooling upon lucene?

Zhenjian YU
I'm using apache commons pooling library to pool the IndexSearcher, so that
my system
can provide high performance.

I wonder if it is reasonable to pooling objects of lucene?
If yes, is there any other objects I can also pool?

Thank you!
Reply | Threaded
Open this post in threaded view
|

Re: does anybody have the experience to do some pooling upon lucene?

Erik Hatcher
A single IndexSearcher is all a system needs to use (in the basic  
sense).  Pooling multiple instances pointing to the same index won't  
benefit your performance.  Things get trickier when you are updating  
the index and want to see the updates.

        Erik


On May 19, 2006, at 5:13 AM, Zhenjian YU wrote:

> I'm using apache commons pooling library to pool the IndexSearcher,  
> so that
> my system
> can provide high performance.
>
> I wonder if it is reasonable to pooling objects of lucene?
> If yes, is there any other objects I can also pool?
>
> Thank you!


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: does anybody have the experience to do some pooling upon lucene?

Zhenjian YU
Hi, Erik,

Thanks for your prompt response.

I didn't dig the source code of lucence deep enough, but I noticed that the
IndexSearcher uses an IndexReader, while the cost of initializing
IndexReader is a bit high.

My application is a webapp, so I think it may be good if I cache some
instances of IndexSearcher to provide service for my webapp. I haven't done
any performance testing yet. Maybe I test it later to see the difference
between caching and without caching.

Best Regards,
Zhenjian

On 5/19/06, Erik Hatcher <[hidden email]> wrote:

>
> A single IndexSearcher is all a system needs to use (in the basic
> sense).  Pooling multiple instances pointing to the same index won't
> benefit your performance.  Things get trickier when you are updating
> the index and want to see the updates.
>
>         Erik
>
>
> On May 19, 2006, at 5:13 AM, Zhenjian YU wrote:
>
> > I'm using apache commons pooling library to pool the IndexSearcher,
> > so that
> > my system
> > can provide high performance.
> >
> > I wonder if it is reasonable to pooling objects of lucene?
> > If yes, is there any other objects I can also pool?
> >
> > Thank you!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: does anybody have the experience to do some pooling upon lucene?

Erik Hatcher

On May 21, 2006, at 10:56 PM, Zhenjian YU wrote:
> I didn't dig the source code of lucence deep enough, but I noticed  
> that the
> IndexSearcher uses an IndexReader, while the cost of initializing
> IndexReader is a bit high.

The key is the IndexReader.

> My application is a webapp, so I think it may be good if I cache some
> instances of IndexSearcher to provide service for my webapp. I  
> haven't done
> any performance testing yet. Maybe I test it later to see the  
> difference
> between caching and without caching.

It is best to keep only a single IndexSearcher/IndexReader  
combination around.  There is no need to have more than one instance,  
and in fact it is a waste of resources to do so.

        Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: does anybody have the experience to do some pooling upon lucene?

Zhenjian YU
OK, got it. Thanks.

On 5/23/06, Erik Hatcher <[hidden email]> wrote:

>
>
> On May 21, 2006, at 10:56 PM, Zhenjian YU wrote:
> > I didn't dig the source code of lucence deep enough, but I noticed
> > that the
> > IndexSearcher uses an IndexReader, while the cost of initializing
> > IndexReader is a bit high.
>
> The key is the IndexReader.
>
> > My application is a webapp, so I think it may be good if I cache some
> > instances of IndexSearcher to provide service for my webapp. I
> > haven't done
> > any performance testing yet. Maybe I test it later to see the
> > difference
> > between caching and without caching.
>
> It is best to keep only a single IndexSearcher/IndexReader
> combination around.  There is no need to have more than one instance,
> and in fact it is a waste of resources to do so.
>
>         Erik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>