lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ype Kingma <>
Subject Re: Search question
Date Wed, 17 Apr 2002 19:39:54 GMT

>I am looking for ways to cancel a search in response to a cancel from a user
>interface. I don't see any thing like a timeout on the
>method. Is there a way to terminate a search request?

You can use the low level search api with a collector that checks for
cancelling and throw an appropriate error when it occurs.
In case the cancel is detected by another thread you could
make it interrupt the thread running the collector.

However, since searching is quite fast I found no need to interrupt search().
I check for user cancel during retrieval of search results
and also just before starting the query in the next database.



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

View raw message