lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cyril Barlow" <i...@fantasyfooty.org>
Subject Re: IndexSearcher in servlet containers
Date Wed, 05 Oct 2005 18:09:10 GMT

----- Original Message -----
From: "Erik Hatcher" <erik@ehatchersolutions.com>
To: <java-user@lucene.apache.org>
Sent: Wednesday, October 05, 2005 6:34 PM
Subject: Re: IndexSearcher in servlet containers


>
> On Oct 5, 2005, at 9:54 AM, Cyril Barlow wrote:
> > Thanks all for your feedback. I'm going to look at building a
> > dedicated
> > server that keeps one IndexSearcher open and each servlet would use
> > that.
> > Either that or look deeper into the Jetty framework to see if I can
> > simply
> > invoke a global IndexSearcher when the server starts and use that.
> > Not quite
> > sure how. Luc, DelayCloseIndexSearcher looks like something that
> > might be of
> > help - I'll have a look at that as well.
>
> I'm really confused on the dilemma here.
>
> You can create a startup hook using one of the Servlet specification
> listeners, create an IndexSearcher there, stuff it into application
> scope (context.setAttribute()).
>
> There is no digging into Jetty's guts needed, just plain and simple
> servlet API will suffice.
>
> Of course you'll also want a facility to re-instantiate the
> IndexSearcher if the index is changing, but that is just building
> upon the pieces I just described.
>
>      Erik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>

>You can create a startup hook using one of the Servlet specification
> listeners, create an IndexSearcher there, stuff it into application
> scope (context.setAttribute()).

OK, I add a IndexSearcher object using the context.setAttribute(IS) but how
do I refer back to it from the servlet code?



		
___________________________________________________________ 
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre.
http://uk.security.yahoo.com

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


Mime
View raw message