lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Winton Davies <>
Subject Re: Killing the ongoing indexing
Date Mon, 03 Dec 2001 16:31:49 GMT
Hi Parag,

  I don't think you can disrupt ongoing indexing -- so, if you can 
somehow collect the signal (^C ?) and then wait exit next time it 
asks for a record ?


p.s. I found a neat trick along these lines for HitCollector 
implementation -- lets say you are happy with the first 50 records 
that are collected ? But there's no way to stop the HitCollector (and 
Scorer) from processing every remaining hit ? Wrong .... :) Try 
throwing an Exception (Try an array out of bounds or div/zero), and 
catch it around the Search(query, HC) call. The HitCOllector will 
have the answers you collected :)

  Ok, suboptimal in the sense that some overhead went into that catch, 
but until there is a way into that API, its all you can do :)  Yep, 
and I know that the answers coming back aren't sorted according to 
relevance, but if they meet external criteria (eg give me firsdt 50 
matchs > date 1 ), then this is perfectly respectable thing to do.


Winton Davies
Lead Engineer, Overture (NSDQ: OVER)
1820 Gateway Drive, Suite 360
San Mateo, CA 94404
work: (650) 403-2259
cell: (650) 867-1598

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

View raw message