lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timo Nentwig (JIRA)" <>
Subject [jira] Commented: (LUCENE-997) Add search timeout support to Lucene
Date Tue, 01 Jan 2008 12:23:43 GMT


Timo Nentwig commented on LUCENE-997:

IMHO it definitely should be part of the core. Being able to control the runtime of queries/your
ressources is crucial for every live system and I really wonder this it has taken so long
to address this.

Otherwise I totally agree with Navdav: that Hits thingie is nice and fine for simple full-text
queries but as soon as things become somewhat more complex you don't get around writing your
own HitCollector (and do stuff like Facets).

I also strongly agree that the timeout HC should be implemented as an decorator (what's been
called "front-end" here), I just quickly wrote an example and attached it (no, I'm not happy
throwing an runtime exception either):

MyHitCollector hc = new MyHitCollector();, null, HitCollectorTimeoutDecorator.decorate( hc, 10 ) );

And finally, why return partial results? I don't think that this is reasonable.

BTW I'm not sure whether volatile in the timer thread is really working reliably in 1.4...

> Add search timeout support to Lucene
> ------------------------------------
>                 Key: LUCENE-997
>                 URL:
>             Project: Lucene - Java
>          Issue Type: New Feature
>            Reporter: Sean Timm
>            Priority: Minor
>         Attachments:,, 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.

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:
For additional commands, e-mail:

View raw message