From java-user-return-26984-apmail-lucene-java-user-archive=lucene.apache.org@lucene.apache.org Mon Mar 19 01:24:34 2007 Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 674 invoked from network); 19 Mar 2007 01:24:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Mar 2007 01:24:33 -0000 Received: (qmail 82659 invoked by uid 500); 19 Mar 2007 01:24:35 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 82627 invoked by uid 500); 19 Mar 2007 01:24:35 -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 82616 invoked by uid 99); 19 Mar 2007 01:24:35 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Mar 2007 18:24:35 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [169.229.70.167] (HELO rescomp.berkeley.edu) (169.229.70.167) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Mar 2007 18:24:26 -0700 Received: by rescomp.berkeley.edu (Postfix, from userid 1007) id B0D535B764; Sun, 18 Mar 2007 18:24:05 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by rescomp.berkeley.edu (Postfix) with ESMTP id A41277F403 for ; Sun, 18 Mar 2007 18:24:05 -0700 (PDT) Date: Sun, 18 Mar 2007 18:24:05 -0700 (PDT) From: Chris Hostetter To: Lucene Users Subject: Re: search timeout In-Reply-To: <45FD0E9F.7040401@getopt.org> Message-ID: References: <45F99411.3060002@aol.com> <45FBAFCA.6000503@yahoo.co.uk> <45FC60D5.6050404@getopt.org> <45FD0E9F.7040401@getopt.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Checked: Checked by ClamAV on apache.org : > imeediately? ... in the totally generic case, this isn't a safe : This was implemented as an easy way to control the maximum search time : for typical queries. I'm open for suggestions how to improve it. One The only thing i can think of that would truely timeout *any* query is a seperate Timer for each search. : thing that sticks like a sore thumb is the use of exceptions to break : the loop - IMHO the collect() method should simply return a boolean or : int code that tells other parts of Lucene to stop collecting hits. HitCollector is an abstract class, it would be pretty easy to add another version of collect that doesn't return void and add Impl's for each that call the other one by default (the way Analyzer.tokenStream use to work) -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org