[ https://issues.apache.org/jira/browse/LUCENE-997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552322 ]
Doron Cohen commented on LUCENE-997: ------------------------------------ Sean, can you revise your patch to follow the suggestions above? That is, create a TimeLimitedCollector that takes and Collector parameter for its constructor. You should be able to hide all the TimerThread details (use long instead of int) within the implementation of this new collector class, and so when moving to Java5 the TimeThread can be replaced by nanoTime. Then we can add to either core search or under contrib. On a related point - I am not happy with programming by a runtimException - if others agree that this should become a standard functionality, how about modifying Collector.collect() to return a stop-or-continue indicator? > Add search timeout support to Lucene > ------------------------------------ > > Key: LUCENE-997 > URL: https://issues.apache.org/jira/browse/LUCENE-997 > Project: Lucene - Java > Issue Type: New Feature > Reporter: Sean Timm > Priority: Minor > Attachments: LuceneTimeoutTest.java, timeout.patch, timeout.patch > > > This patch is based on Nutch-308. > This patch adds support for a maximum search time limit. After this time is > exceeded, the search thread is stopped, partial results (if any) are returned > and the total number of results is estimated. > This patch tries to minimize the overhead related to time-keeping by using a > version of safe unsynchronized timer. > This was also discussed in an e-mail thread. > http://www.nabble.com/search-timeout-tf3410206.html#a9501029 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]