Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 17388 invoked from network); 5 Oct 2005 18:11:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Oct 2005 18:11:51 -0000 Received: (qmail 58217 invoked by uid 500); 5 Oct 2005 18:11:46 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 58195 invoked by uid 500); 5 Oct 2005 18:11:45 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 58184 invoked by uid 99); 5 Oct 2005 18:11:45 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Oct 2005 11:11:45 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [217.12.11.36] (HELO smtp005.mail.ukl.yahoo.com) (217.12.11.36) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 05 Oct 2005 11:11:48 -0700 Received: (qmail 82139 invoked from network); 5 Oct 2005 18:11:22 -0000 Received: from unknown (HELO ME) (directcareer@82.33.132.136 with login) by smtp005.mail.ukl.yahoo.com with SMTP; 5 Oct 2005 18:11:21 -0000 Message-ID: <034f01c5c9d7$e41cee20$0802a8c0@ME> Reply-To: "Cyril Barlow" From: "Cyril Barlow" To: References: <00cd01c5c9ae$d7af2780$0802a8c0@ME> <1DD0177B-91D8-4B2E-BCDE-07DEE558E826@ehatchersolutions.com> <016b01c5c9b4$5dbad9f0$0802a8c0@ME> Subject: Re: IndexSearcher in servlet containers Date: Wed, 5 Oct 2005 19:09:10 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ----- Original Message ----- From: "Erik Hatcher" To: 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