lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: search timeout
Date Sat, 17 Mar 2007 22:49:45 GMT

Ack! ... this is what happens when i only skim a patch and then write with
my odd mix of authority and childlike speling....

: * it creates a single (static) timer thread, which counts the "ticks",
: every couple hundred ms (configurable). It uses a volatile int counter,
: therefore avoiding the need to synchronize.
:
: * each HitColector records the start tick count in its constructor, and
: then checks the current tick count in collect(...). If the difference is

So i was way wrong about the Timer per search ... but it seems like this
appraoch still has the downside that "long" searches resulting in no
matches won't time out (because collect will never be called and the tick
counter will never be compared)

Was this considered a non issue for Nutch because the query structure is
typiclly well known and quereis with no results usually return
imeediately? ... in the totally generic case, this isn't a safe
assumption.  Crazy complex BooleanQueries, or worse still: arbitrary
client written Query classes, could spend untold times advancing to the
"next" match (which may not exist at all)



-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message