Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@apache.org Received: (qmail 72602 invoked from network); 17 Apr 2002 18:27:09 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 17 Apr 2002 18:27:09 -0000 Received: (qmail 9090 invoked by uid 97); 17 Apr 2002 18:27:12 -0000 Delivered-To: qmlist-jakarta-archive-lucene-user@jakarta.apache.org Received: (qmail 9073 invoked by uid 97); 17 Apr 2002 18:27:11 -0000 Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Users List" Reply-To: "Lucene Users List" Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 9062 invoked from network); 17 Apr 2002 18:27:11 -0000 Mime-Version: 1.0 X-Sender: ykingma@pop.xs4all.nl Message-Id: In-Reply-To: References: Date: Wed, 17 Apr 2002 20:39:54 +0100 To: "Lucene Users List" From: Ype Kingma Subject: Re: Search question Content-Type: text/plain; charset="us-ascii" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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: For additional commands, e-mail: