Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6744DD275 for ; Thu, 1 Nov 2012 22:00:59 +0000 (UTC) Received: (qmail 18026 invoked by uid 500); 1 Nov 2012 22:00:57 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 17975 invoked by uid 500); 1 Nov 2012 22:00:57 -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 17966 invoked by uid 99); 1 Nov 2012 22:00:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2012 22:00:57 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.210.48] (HELO mail-da0-f48.google.com) (209.85.210.48) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2012 22:00:52 +0000 Received: by mail-da0-f48.google.com with SMTP id z8so1411215dad.35 for ; Thu, 01 Nov 2012 15:00:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:x-gm-message-state; bh=rs6xqsuQ7fx27qun/sHWMyi47i0TLTf4TSlF9hh+JqY=; b=A7TgH1um01FhBPVCz75lDeJNMIxXxmUAgmIdf6nT3F401c+blAMaDuCFE2mQAo7PR8 6sBDZq6xv2FovjiRmN0sffMm1Y0B0zyX357CqbbgyYEWmHlpmBuwJqWaO1Uhbl5Defnd XZDiICqym0fioi7D0FH5Qb+BeDOgmJceDRtMCdohljz2law29oVSRL0pTxoTujpSGNJh iCLg03EZ02UvdeqNFO1GVbWM8b3WIQcJNm+YWFxUS/woqrmrPExeOhr/O1T08PO0OX5D iZAmBsc43+X/TM4z0H15siFIsBjgm9uL0Rtigna9U1i+S3MVeFLZp4GEL0LPo6rzJNF0 7iJQ== Received: by 10.66.75.165 with SMTP id d5mr114960431paw.39.1351807231415; Thu, 01 Nov 2012 15:00:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.240.104 with HTTP; Thu, 1 Nov 2012 15:00:11 -0700 (PDT) In-Reply-To: <20121101212758.137740@gmx.net> References: <20121101212758.137740@gmx.net> From: Michael McCandless Date: Thu, 1 Nov 2012 18:00:11 -0400 Message-ID: Subject: Re: How to correctly use SearcherManager#close? To: java-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQlXizgqMPOiFaUsqIb+/7E36So6aALPaXhCa6CIEQs1D0noZBrey1q40C/6Jb2pBNayad3M X-Virus-Checked: Checked by ClamAV on apache.org Call it when you know you'll no longer need to call .acquire on it anymore (typically this would be when your webapp is being destroyed). Really all this does is drop its internal reference to the current searcher. Any in-flight searches still outstanding will run fine (and they should call .release, like normal, once they are done, even though you've already called .close on the SearcherManager)... Mike McCandless http://blog.mikemccandless.com On Thu, Nov 1, 2012 at 5:27 PM, Michael-O <1983-01-06@gmx.net> wrote: > Hi folks, > > while I do understand the workflow with this class, I do not understand when to call close(). The JavaDoc is not crystal clear on that. Am I supposed to call this method after release() or when my webapp is destroyed? > > Thanks, > > Michael > > --------------------------------------------------------------------- > 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