# Abort requested query

**URL:** <https://discuss.elastic.co/t/abort-requested-query/12649>\
**Category:** Elasticsearch\
**Created:** [July 3, 2013, 3:46pm UTC](https://discuss.elastic.co/t/abort-requested-query/12649 "2013-07-03T15:46:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robin\_Verlangen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/robin_verlangen/32/1542_2.png) [@Robin\_Verlangen](https://discuss.elastic.co/u/Robin_Verlangen)\
**Post date:** [July 3, 2013, 3:46pm UTC](https://discuss.elastic.co/t/abort-requested-query/12649/1 "2013-07-03T15:46:47Z")

</div>

Hi there,

Is it possible with the java client to abort an already started query? This  
would look like this:

1. Prepare query
2. Execute
3. Wait a while (maybe 1-2 seconds)
4. Notice that the query result isn't needed
5. Call abort
6. Immediately free any resources allocated to that specific query

Best regards,

Robin Verlangen  
_Data Architect_  
\*  
\*  
W [http://www.robinverlangen.nl](http://www.robinverlangen.nl)  
E robin@us2.nl

[http://goo.gl/Lt7BC](http://goo.gl/Lt7BC)  
_What is CloudPelican? [http://goo.gl/HkB3D](http://goo.gl/HkB3D)_

Disclaimer: The information contained in this message and attachments is  
intended solely for the attention and use of the named addressee and may be  
confidential. If you are not the intended recipient, you are reminded that  
the information remains the property of the sender. You must not use,  
disclose, distribute, copy, print or rely on this e-mail. If you have  
received this message in error, please contact the sender immediately and  
irrevocably delete this message and any copies.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Robin\_Verlangen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/robin_verlangen/32/1542_2.png) [@Robin\_Verlangen](https://discuss.elastic.co/u/Robin_Verlangen)\
**Post date:** [July 5, 2013, 5:43am UTC](https://discuss.elastic.co/t/abort-requested-query/12649/2 "2013-07-05T05:43:14Z")

</div>

Does anyone out here have a clue whether this is possible?

Best regards,

Robin Verlangen  
_Data Architect_  
\*  
\*  
W [http://www.robinverlangen.nl](http://www.robinverlangen.nl)  
E robin@us2.nl

[http://goo.gl/Lt7BC](http://goo.gl/Lt7BC)  
_What is CloudPelican? [http://goo.gl/HkB3D](http://goo.gl/HkB3D)_

Disclaimer: The information contained in this message and attachments is  
intended solely for the attention and use of the named addressee and may be  
confidential. If you are not the intended recipient, you are reminded that  
the information remains the property of the sender. You must not use,  
disclose, distribute, copy, print or rely on this e-mail. If you have  
received this message in error, please contact the sender immediately and  
irrevocably delete this message and any copies.

On Wed, Jul 3, 2013 at 5:46 PM, Robin Verlangen [robin@us2.nl](mailto:robin@us2.nl) wrote:

> Hi there,
> 
> Is it possible with the java client to abort an already started query?  
> This would look like this:
> 
> 1. Prepare query
> 2. Execute
> 3. Wait a while (maybe 1-2 seconds)
> 4. Notice that the query result isn't needed
> 5. Call abort
> 6. Immediately free any resources allocated to that specific query
> 
> Best regards,
> 
> Robin Verlangen  
> _Data Architect_  
> \*  
> \*  
> W [http://www.robinverlangen.nl](http://www.robinverlangen.nl)  
> E robin@us2.nl
> 
> [http://goo.gl/Lt7BC](http://goo.gl/Lt7BC)  
> _What is CloudPelican? [http://goo.gl/HkB3D](http://goo.gl/HkB3D)_
> 
> Disclaimer: The information contained in this message and attachments is  
> intended solely for the attention and use of the named addressee and may be  
> confidential. If you are not the intended recipient, you are reminded that  
> the information remains the property of the sender. You must not use,  
> disclose, distribute, copy, print or rely on this e-mail. If you have  
> received this message in error, please contact the sender immediately and  
> irrevocably delete this message and any copies.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![mvg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mvg/32/98890_2.png) [@mvg](https://discuss.elastic.co/u/mvg)\
**Post date:** [July 5, 2013, 8:14am UTC](https://discuss.elastic.co/t/abort-requested-query/12649/3 "2013-07-05T08:14:46Z")

</div>

Hi Robin,

There is no real abort mechanism in the way you are describing it.

The Java client has an async api (with ActionFuture) that allows to ignore  
the search execution from the client side. Maybe that is useful for you,  
but it doesn't clean up any server side resources.

Martijn

On 5 July 2013 07:43, Robin Verlangen [robin@us2.nl](mailto:robin@us2.nl) wrote:

> Does anyone out here have a clue whether this is possible?
> 
> Best regards,
> 
> Robin Verlangen  
> _Data Architect_  
> \*  
> \*  
> W [http://www.robinverlangen.nl](http://www.robinverlangen.nl)  
> E robin@us2.nl
> 
> [http://goo.gl/Lt7BC](http://goo.gl/Lt7BC)  
> _What is CloudPelican? [http://goo.gl/HkB3D](http://goo.gl/HkB3D)_
> 
> Disclaimer: The information contained in this message and attachments is  
> intended solely for the attention and use of the named addressee and may be  
> confidential. If you are not the intended recipient, you are reminded that  
> the information remains the property of the sender. You must not use,  
> disclose, distribute, copy, print or rely on this e-mail. If you have  
> received this message in error, please contact the sender immediately and  
> irrevocably delete this message and any copies.
> 
> On Wed, Jul 3, 2013 at 5:46 PM, Robin Verlangen [robin@us2.nl](mailto:robin@us2.nl) wrote:
> 
> > Hi there,
> > 
> > Is it possible with the java client to abort an already started query?  
> > This would look like this:
> > 
> > 1. Prepare query
> > 2. Execute
> > 3. Wait a while (maybe 1-2 seconds)
> > 4. Notice that the query result isn't needed
> > 5. Call abort
> > 6. Immediately free any resources allocated to that specific query
> > 
> > Best regards,
> > 
> > Robin Verlangen  
> > _Data Architect_  
> > \*  
> > \*  
> > W [http://www.robinverlangen.nl](http://www.robinverlangen.nl)  
> > E robin@us2.nl
> > 
> > [http://goo.gl/Lt7BC](http://goo.gl/Lt7BC)  
> > _What is CloudPelican? [http://goo.gl/HkB3D](http://goo.gl/HkB3D)_
> > 
> > Disclaimer: The information contained in this message and attachments is  
> > intended solely for the attention and use of the named addressee and may be  
> > confidential. If you are not the intended recipient, you are reminded that  
> > the information remains the property of the sender. You must not use,  
> > disclose, distribute, copy, print or rely on this e-mail. If you have  
> > received this message in error, please contact the sender immediately and  
> > irrevocably delete this message and any copies.
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
Met vriendelijke groet,

Martijn van Groningen

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:28am UTC](https://discuss.elastic.co/t/abort-requested-query/12649/4 "2017-07-06T02:28:06Z")

</div>


