lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tatu Saloranta (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-520) Ability to abort hit collection
Date Thu, 16 Mar 2006 17:48:13 GMT
    [ 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


Mime
View raw message