lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <>
Subject Re: Preventing "killer" queries
Date Tue, 07 Feb 2006 20:10:35 GMT
mark harwood wrote:
> For these outlier situations is it worth adding a
> "maxDf" property to TermQuery like BooleanQuery's
> maxClause query-time control? I could fix my problem
> in my own app-specific query construction code but I
> wonder if others would find it a useful fix to add to
> TermQuery in the Lucene core?

Another approach is to use a TopDocCollector (in 1.9 only) and override 
the collect() method to, if too much time has transpired, throw an 
exception to stop the query with the results found thus far.

For an example of how to extend TopDocCollector, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message