Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 54692 invoked from network); 16 Mar 2006 17:48:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 Mar 2006 17:48:42 -0000 Received: (qmail 30998 invoked by uid 500); 16 Mar 2006 17:48:36 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 30434 invoked by uid 500); 16 Mar 2006 17:48:35 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 30423 invoked by uid 99); 16 Mar 2006 17:48:34 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Mar 2006 09:48:34 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Mar 2006 09:48:34 -0800 Received: from ajax (localhost.localdomain [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 7A9EAD49FE for ; Thu, 16 Mar 2006 17:48:13 +0000 (GMT) Message-ID: <1872434248.1142531293499.JavaMail.jira@ajax> Date: Thu, 16 Mar 2006 17:48:13 +0000 (GMT) From: "Tatu Saloranta (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-520) Ability to abort hit collection In-Reply-To: <801482238.1142463958126.JavaMail.jira@ajax> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/LUCENE-520?page=comments#action_12370726 ] Tatu Saloranta commented on LUCENE-520: --------------------------------------- Quick note regarding exceptions: an easy way to remove most of runtime exception overhead is to just construct a shared exception object in advance, and keep throwing that. Stack information will obviously be irrelevant (and refer to the place where it was constructed), but since creating stack frame objects is the expensive part, reusing that exception results in very fast operation. Obviously it's not a very clean way to do it, so should only be done by application code, and developers need to understand that it's a token exception only used for signalling. For this reason, one should in general create a new exception class, too, to be to catch just those instances (but no other runtime exceptions). > Ability to abort hit collection > ------------------------------- > > Key: LUCENE-520 > URL: http://issues.apache.org/jira/browse/LUCENE-520 > Project: Lucene - Java > Type: Improvement > Components: Search > Versions: 1.9 > Reporter: Eric Jain > Priority: Minor > > If the HitCollector.collect method returned a boolean value rather than void, this value could be used to determine whether any further hits should be reported. This would speed up things a bit when all you need is a confirmation that a query produces some hits (e.g. for generating suggestions). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org