# Marvel Sense GET/POST

**URL:** <https://discuss.elastic.co/t/marvel-sense-get-post/21479>\
**Category:** Elasticsearch\
**Created:** [January 5, 2015, 1:06pm UTC](https://discuss.elastic.co/t/marvel-sense-get-post/21479 "2015-01-05T13:06:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul\_Scott](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paul_scott/32/1023_2.png) [@Paul\_Scott](https://discuss.elastic.co/u/Paul_Scott)\
**Post date:** [January 5, 2015, 1:06pm UTC](https://discuss.elastic.co/t/marvel-sense-get-post/21479/1 "2015-01-05T13:06:06Z")

</div>

Regarding the behaviour of Sense to automatically choose POST regardless of  
the user writing GET:

I was recently rewriting a search query I had written in the Sense UI from  
a search query to a request for a raw document by ID, using the GET API. In  
the process of changing from

GET /index/type/\_search  
{ ... }

to

GET /index/type/id

I submitted

GET /index/type/id  
{... }

which Sense helpfully submitted as a POST request, over-writing the  
document with the search query. In production.

To say that this behaviour was unexpected and unhelpful would be an  
understatement. I would consider it irresponsible and unsafe, and I highly  
recommend the behaviour be disabled.

Please try to read past my obvious irritation and the part of this mistake  
which falls on my head, to the part in this mistake that the Sense UI  
played too.

All the best,

Paul

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/f2588751-a008-4b59-9041-b63c098580dd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f2588751-a008-4b59-9041-b63c098580dd%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 5, 2015, 8:57pm UTC](https://discuss.elastic.co/t/marvel-sense-get-post/21479/2 "2015-01-05T20:57:13Z")

</div>

It'd be great if you could raise this as an issue on github for this  
behaviour to be checked - [GitHub - elastic/elasticsearch: Free and Open, Distributed, RESTful Search Engine](https://github.com/elasticsearch/elasticsearch)

On 6 January 2015 at 00:06, Paul Scott [paul@duedil.com](mailto:paul@duedil.com) wrote:

> Regarding the behaviour of Sense to automatically choose POST regardless  
> of the user writing GET:
> 
> I was recently rewriting a search query I had written in the Sense UI from  
> a search query to a request for a raw document by ID, using the GET API. In  
> the process of changing from
> 
> GET /index/type/\_search  
> { ... }
> 
> to
> 
> GET /index/type/id
> 
> I submitted
> 
> GET /index/type/id  
> {... }
> 
> which Sense helpfully submitted as a POST request, over-writing the  
> document with the search query. In production.
> 
> To say that this behaviour was unexpected and unhelpful would be an  
> understatement. I would consider it irresponsible and unsafe, and I highly  
> recommend the behaviour be disabled.
> 
> Please try to read past my obvious irritation and the part of this mistake  
> which falls on my head, to the part in this mistake that the Sense UI  
> played too.
> 
> All the best,
> 
> Paul
> 
> --  
> 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).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/f2588751-a008-4b59-9041-b63c098580dd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f2588751-a008-4b59-9041-b63c098580dd%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/f2588751-a008-4b59-9041-b63c098580dd%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/f2588751-a008-4b59-9041-b63c098580dd%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X\_GammQv\_kpXTGG6Cv9cGSjfyWOFaUf4Ln6bdLPewGM6w%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X_GammQv_kpXTGG6Cv9cGSjfyWOFaUf4Ln6bdLPewGM6w%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Boaz\_Leskes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/boaz_leskes/32/723_2.png) [@Boaz\_Leskes](https://discuss.elastic.co/u/Boaz_Leskes)\
**Post date:** [January 5, 2015, 9:24pm UTC](https://discuss.elastic.co/t/marvel-sense-get-post/21479/3 "2015-01-05T21:24:18Z")

</div>

Heya,

Yeah, I agree this is annoying and dangerous. For what it's worth , this  
happens now is that browsers do not allow sending GETs with a body so Sense  
allows you to use the GET syntax as documented but sends it as POST (which  
is accepted by ES). The plan is to change and do this only for while listed  
end points (ala \_search). We already have an issue for it. I'll report here  
what it's done.

Cheers,  
Boaz

On Monday, January 5, 2015 9:57:41 PM UTC+1, Mark Walkom wrote:

> It'd be great if you could raise this as an issue on github for this  
> behaviour to be checked - [GitHub - elastic/elasticsearch: Free and Open, Distributed, RESTful Search Engine](https://github.com/elasticsearch/elasticsearch)
> 
> On 6 January 2015 at 00:06, Paul Scott [paul@duedil.com](mailto:paul@duedil.com) wrote:
> 
> > Regarding the behaviour of Sense to automatically choose POST regardless  
> > of the user writing GET:
> > 
> > I was recently rewriting a search query I had written in the Sense UI  
> > from a search query to a request for a raw document by ID, using the GET  
> > API. In the process of changing from
> > 
> > GET /index/type/\_search  
> > { ... }
> > 
> > to
> > 
> > GET /index/type/id
> > 
> > I submitted
> > 
> > GET /index/type/id  
> > {... }
> > 
> > which Sense helpfully submitted as a POST request, over-writing the  
> > document with the search query. In production.
> > 
> > To say that this behaviour was unexpected and unhelpful would be an  
> > understatement. I would consider it irresponsible and unsafe, and I highly  
> > recommend the behaviour be disabled.
> > 
> > Please try to read past my obvious irritation and the part of this  
> > mistake which falls on my head, to the part in this mistake that the Sense  
> > UI played too.
> > 
> > All the best,
> > 
> > Paul
> > 
> > --  
> > 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).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/f2588751-a008-4b59-9041-b63c098580dd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f2588751-a008-4b59-9041-b63c098580dd%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/f2588751-a008-4b59-9041-b63c098580dd%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/f2588751-a008-4b59-9041-b63c098580dd%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/06de9586-41f1-4b5e-bce8-fe258dc93574%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/06de9586-41f1-4b5e-bce8-fe258dc93574%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 5, 2015, 9:44pm UTC](https://discuss.elastic.co/t/marvel-sense-get-post/21479/4 "2015-01-05T21:44:38Z")

</div>

I've since been informed this is a known issue and a bug has been raised  
for it, so a fix is on the way.

On 6 January 2015 at 07:57, Mark Walkom [markwalkom@gmail.com](mailto:markwalkom@gmail.com) wrote:

> It'd be great if you could raise this as an issue on github for this  
> behaviour to be checked - [GitHub - elastic/elasticsearch: Free and Open, Distributed, RESTful Search Engine](https://github.com/elasticsearch/elasticsearch)
> 
> On 6 January 2015 at 00:06, Paul Scott [paul@duedil.com](mailto:paul@duedil.com) wrote:
> 
> > Regarding the behaviour of Sense to automatically choose POST regardless  
> > of the user writing GET:
> > 
> > I was recently rewriting a search query I had written in the Sense UI  
> > from a search query to a request for a raw document by ID, using the GET  
> > API. In the process of changing from
> > 
> > GET /index/type/\_search  
> > { ... }
> > 
> > to
> > 
> > GET /index/type/id
> > 
> > I submitted
> > 
> > GET /index/type/id  
> > {... }
> > 
> > which Sense helpfully submitted as a POST request, over-writing the  
> > document with the search query. In production.
> > 
> > To say that this behaviour was unexpected and unhelpful would be an  
> > understatement. I would consider it irresponsible and unsafe, and I highly  
> > recommend the behaviour be disabled.
> > 
> > Please try to read past my obvious irritation and the part of this  
> > mistake which falls on my head, to the part in this mistake that the Sense  
> > UI played too.
> > 
> > All the best,
> > 
> > Paul
> > 
> > --  
> > 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).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/f2588751-a008-4b59-9041-b63c098580dd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f2588751-a008-4b59-9041-b63c098580dd%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/f2588751-a008-4b59-9041-b63c098580dd%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/f2588751-a008-4b59-9041-b63c098580dd%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X-Fxju8SodKDp\_LuaK8WXfQuLjtgK2RGD%3DbOkQ2wTi9iQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X-Fxju8SodKDp_LuaK8WXfQuLjtgK2RGD%3DbOkQ2wTi9iQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:40am UTC](https://discuss.elastic.co/t/marvel-sense-get-post/21479/5 "2017-07-06T00:40:43Z")

</div>


