Error in documentation: The Search API


(Andrea) #1

In new to Elastic Search, and I am following the online documentation.
When introducing the Search API (and in the following pages), all the query with a body use the HTTP GET method; shouldn't it use the POST method?

Thanks


(David Pilato) #2

HTTP RFC supports GET with body. So this is correct.
We also support POST in such a case for some clients (like javascript) who does not support GET with body.


(Andrea) #3

OK. I'm using bash+curl and it didn't work, I had to change from GET to POST.

Thanks


(David Pilato) #4

bash+curl does work on my end.


(Andrea) #5

You are right, Elasticsearch works with GET+body.

The strage thing is that curl on my machine do send a GET request with body, but ES does not reply. I managed to test it sending a hand-made request using Firefox developer tools (I had to use Wireshark to check if there was the body).

Thanks