if you are interested here is the brief scratch of the possible hack:
- client adds special query ID parameter into request &interruptID=DEADBEEF
- create InterruptionComponent and add into search handler list before
query component
- this component adds PostFilter which yields DelegatingCollector which
checks volatile interruption flag, if it's triggered, the collector throws
TimeLimitingCollector.TimeExceededException which is handled by current
timeAllowed logic (see TimeLimitingCollector)
- DelegatingCollector is registered in globally accessible map by the given
interruptID. InterruptionComponent can hold this map.
- SolrRequestInfo.addCloseHook(Closeable) can wipe the entry from this map.

- InterruptionComponent is registered in other SearchHandler without any
other sibling components
- when it receives interruption request with the specified
&interruptID=DEADBEEF it can find PostFilter in the map and trigger the
interruption flag.



On Mon, Jan 13, 2014 at 10:47 PM, Luis Lebolo <luis.leb...@gmail.com> wrote:

> Hi All,
>
> Is it possible to cancel a Solr query/request currently in progress?
>
> Suppose the user starts searching for something (that takes a long time for
> Solr to process), then decides the modify the query. I can simply ignore
> the previous request and create a new request, but Solr is still processing
> the old request, correct?
>
> Is there any way to cancel that first request?
>
> Thanks,
> Luis
>



-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics

<http://www.griddynamics.com>
 <mkhlud...@griddynamics.com>

Reply via email to