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.
On 6 January 2015 at 00:06, Paul Scott 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.
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:
On 6 January 2015 at 00:06, Paul Scott 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.
On 6 January 2015 at 00:06, Paul Scott 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.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.