lucene-java-user mailing list archives

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

>Hi,
>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 Searcher.search()
>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.

Regards,
Ype

-- 

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


Mime
View raw message