Mailing List Archive

Killing the ongoing indexing
Hi all,

If i want to stop the indexing for current ongoing searching operation then
how should i proceed?

thanx in advance

regards
parag


--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: Killing the ongoing indexing [ In reply to ]
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 ?

Winton

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
http://www.overture.com/

--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>