question: private void searchWithTimeLimiter ( final Filter luceneFilter , Collector collector ) throws IOException { if ( cmd . getTimeAllowed ( ) > 0 ) { if ( timeLimitingCollector == null ) { timeLimitingCollector = new TimeLimitingCollector ( collector , TimeLimitingCollector . getGlobalCounter ( ) , cmd . getTimeAllowed ( ) ) ; } else { timeLimitingCollector . setCollector ( collector ) ; } collector = timeLimitingCollector ; } try { searcher . search ( query , luceneFilter , collector ) ; } catch ( TimeLimitingCollector . TimeExceededException x ) { logger . warn ( "Query: " + query + "; " + x . getMessage ( ) ) ; qr . setPartialResults ( true ) ; } }
target:  Invokes search with the specified filter and collector.   If a time limit has been specified, wrap the collector in a TimeLimitingCollector