lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sven-Teichmann <>
Subject Abort a search
Date Mon, 13 Oct 2014 14:51:47 GMT
I try to find a way to abort a running search.
I am aware of the TimeLimitingCollector, but in my case this will not help at
all. The problem is, that I have to cancel very complex and long running
searches, which might never find something. Because they do not find something,
the collect method of the TimeLimitingCollector won't be called and therefore
the search will never be aborted.
The only way I found to do this is to run the search in an extra thread and if
it is not finished within a given time, kill the thread with Thread.stop(). What
happens to IndexReaders/Searchers in this case (we are using MMapDirectory)?
Is there a way to cleanly abort a running search?
Sven Teichmann
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message