org.elasticsearch.client.ResponseException: GET https://myhost.com/es/_search: HTTP/1.1 400 Error
While an invalid query, for example trying to sort by a non existent field, that gives a similar ResponseException 400 error, shows up on elasticsearch logs, the above isnt showing up in logs at all.
Hence proving difficult to debug too.
Apparently the gateway did not like GET with body requests and was not letting requests through.
No wonder I wasnt seeing any error msgs from elasticsearch.
I tried GET with body by directly connecting to the machine, worked like charm.
Looks like I will resort to POST with body. This post confirmed the same too - https://github.com/elastic/elasticsearch-py/issues/281
This should be mentioned on the Java REST sample page as a footnote or something. Would have saved me a lot of heart burn.
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.