Open javanna opened 8 years ago
Unfortunately we can't make GET requests with bodies, so the only way to fix this is to prevent users from writing them in sense
I agree with you though, that example should not create a document in es
yeah, this has been raised before and is indeed a pain. The idea I had for solving this is only do the GET-> POST auto converstion for white listed APIs where we know it's safe. Typically _search.
Same problem if you want to do an _explain for a query:
GET /index/type/_explain
{
"query": {
...
This creates a document _explain
which is really not what I wanted to do... So as-is, there is no way to _explain
with sense. :(
Any feedback on this?
If you have a search api call but you omit the _search endpoint in the url, you end up indexing a document:
Same doesn't happen via command line, where you get a "feature not found" as the request goes to the get index api and the type is not recognized as a feature. Good as it throws an error rather than writing. We should never write with GET!