Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-User

Interrupting a query

 

 

Lucene java-user RSS feed   Index | Next | Previous | View Threaded


paul at lucasmail

Jul 15, 2008, 9:22 PM

Post #1 of 6 (237 views)
Permalink
Interrupting a query

If a complicated query is running in a Thread, how does Lucene respond
to Thread.interrupt()? I want to be able to interrupt an in-progress
query.

- Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe[at]lucene.apache.org
For additional commands, e-mail: java-user-help[at]lucene.apache.org


gsingers at apache

Jul 16, 2008, 5:14 AM

Post #2 of 6 (219 views)
Permalink
Re: Interrupting a query [In reply to]

See https://issues.apache.org/jira/browse/LUCENE-997

-Grant

On Jul 16, 2008, at 12:22 AM, Paul J. Lucas wrote:

> If a complicated query is running in a Thread, how does Lucene
> respond to Thread.interrupt()? I want to be able to interrupt an in-
> progress query.
>
> - Paul
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe[at]lucene.apache.org
> For additional commands, e-mail: java-user-help[at]lucene.apache.org
>

--------------------------
Grant Ingersoll
http://www.lucidimagination.com

Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ








---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe[at]lucene.apache.org
For additional commands, e-mail: java-user-help[at]lucene.apache.org


paul at lucasmail

Jul 16, 2008, 6:54 AM

Post #3 of 6 (215 views)
Permalink
Re: Interrupting a query [In reply to]

That has nothing to do with interrupting a query at some arbitrary time.

- Paul


On Jul 16, 2008, at 5:14 AM, Grant Ingersoll wrote:

> See https://issues.apache.org/jira/browse/LUCENE-997
>
> -Grant
>
> On Jul 16, 2008, at 12:22 AM, Paul J. Lucas wrote:
>
>> If a complicated query is running in a Thread, how does Lucene
>> respond to Thread.interrupt()? I want to be able to interrupt an
>> in-progress query.
>>
>> - Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe[at]lucene.apache.org
For additional commands, e-mail: java-user-help[at]lucene.apache.org


gsingers at apache

Jul 18, 2008, 3:51 AM

Post #4 of 6 (194 views)
Permalink
Re: Interrupting a query [In reply to]

True, but I think the approach is similar, in that you need to have
the hit collector check to see if your interrupt flag has been set and
then exit out.

-Grant

On Jul 16, 2008, at 9:54 AM, Paul J. Lucas wrote:

> That has nothing to do with interrupting a query at some arbitrary
> time.
>
> - Paul
>
>
> On Jul 16, 2008, at 5:14 AM, Grant Ingersoll wrote:
>
>> See https://issues.apache.org/jira/browse/LUCENE-997
>>
>> -Grant
>>
>> On Jul 16, 2008, at 12:22 AM, Paul J. Lucas wrote:
>>
>>> If a complicated query is running in a Thread, how does Lucene
>>> respond to Thread.interrupt()? I want to be able to interrupt an
>>> in-progress query.
>>>
>>> - Paul
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe[at]lucene.apache.org
> For additional commands, e-mail: java-user-help[at]lucene.apache.org
>







---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe[at]lucene.apache.org
For additional commands, e-mail: java-user-help[at]lucene.apache.org


paul at lucasmail

Jul 22, 2008, 11:48 AM

Post #5 of 6 (155 views)
Permalink
Re: Interrupting a query [In reply to]

If I'm calling:

IndexSearcher.search( query, sortOrder );

how, exactly, can I do what you suggest? *That* call is what I want
to interrupt.

- Paul


On Jul 18, 2008, at 3:51 AM, Grant Ingersoll wrote:

> True, but I think the approach is similar, in that you need to have
> the hit collector check to see if your interrupt flag has been set
> and then exit out.
>
> On Jul 16, 2008, at 9:54 AM, Paul J. Lucas wrote:
>
>> That has nothing to do with interrupting a query at some arbitrary
>> time.
>>
>> On Jul 16, 2008, at 5:14 AM, Grant Ingersoll wrote:
>>
>>> See https://issues.apache.org/jira/browse/LUCENE-997
>>>
>>> On Jul 16, 2008, at 12:22 AM, Paul J. Lucas wrote:
>>>
>>>> If a complicated query is running in a Thread, how does Lucene
>>>> respond to Thread.interrupt()? I want to be able to interrupt an
>>>> in-progress query.
>>>>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe[at]lucene.apache.org
For additional commands, e-mail: java-user-help[at]lucene.apache.org


gsingers at apache

Jul 22, 2008, 2:51 PM

Post #6 of 6 (152 views)
Permalink
Re: Interrupting a query [In reply to]

You can't with that call. You have to make one that uses a
HitCollector, and your hit collector needs to be interruptable and it
probably needs to handle your sorting. Sounds like a nice
contribution/patch.

Sorry, I can't offer a better solution.

-Grant

On Jul 22, 2008, at 2:48 PM, Paul J. Lucas wrote:

> If I'm calling:
>
> IndexSearcher.search( query, sortOrder );
>
> how, exactly, can I do what you suggest? *That* call is what I want
> to interrupt.
>
> - Paul
>
>
> On Jul 18, 2008, at 3:51 AM, Grant Ingersoll wrote:
>
>> True, but I think the approach is similar, in that you need to have
>> the hit collector check to see if your interrupt flag has been set
>> and then exit out.
>>
>> On Jul 16, 2008, at 9:54 AM, Paul J. Lucas wrote:
>>
>>> That has nothing to do with interrupting a query at some arbitrary
>>> time.
>>>
>>> On Jul 16, 2008, at 5:14 AM, Grant Ingersoll wrote:
>>>
>>>> See https://issues.apache.org/jira/browse/LUCENE-997
>>>>
>>>> On Jul 16, 2008, at 12:22 AM, Paul J. Lucas wrote:
>>>>
>>>>> If a complicated query is running in a Thread, how does Lucene
>>>>> respond to Thread.interrupt()? I want to be able to interrupt
>>>>> an in-progress query.
>>>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe[at]lucene.apache.org
> For additional commands, e-mail: java-user-help[at]lucene.apache.org
>

--------------------------
Grant Ingersoll
http://www.lucidimagination.com

Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ








---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe[at]lucene.apache.org
For additional commands, e-mail: java-user-help[at]lucene.apache.org

Lucene java-user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.