[ http://issues.apache.org/jira/browse/LUCENE-520?page=comments#action_12370719 ]
Doug Cutting commented on LUCENE-520: ------------------------------------- Jeremy: Have you tested that scorer.skipTo(Integer.MAX_VALUE) actually works? It might, but it also might not, depending on how much state is cached on the stack. For what it's worth, a few months ago I tried to change HitCollector to return a boolean that would stop things, but I couldn't figure out a simple way to make it work. I think my plan was (for back-compatibility) to add a new HitCollector method, isCollected(), that returned a boolean, then change all of the scorer implementations to call isCollected(), and make the default implementation of isCollected() call collect(), for back-compatibility. I don't remember the details, but it was much harder than I thought it would be to make this work. So I ended up throwing an Exception, which is not ideal. > 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]