Hi everyone,
My pc is windows 10. I want to use curl command to get the data from elasticsearch, but I have some problems.
this is my curl command (a small test):
curl -GET "http://localhost:9200/_search" -d'{"query": {"match_all": {}}}'
and the cmd show the error:
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"request [
/_search] contains unrecognized parameter: ['{query:]"}],"type":"illegal_argumen
t_exception","reason":"request [/_search] contains unrecognized parameter: ['{qu
ery:]"},"status":400}curl: (3) [globbing] unmatched brace in column 1
curl: (3) [globbing] empty string within braces in column 2
thanks for your reply.
I try to add the space: curl "http://localhost:9200/_search" -d '{"query": {"match_all": {}}}'
and the error became to this one:
{"error":"Content-Type header [application/x-www-form-urlencoded] is not support
ed","status":406}curl: (3) [globbing] unmatched brace in column 1
curl: (3) [globbing] empty string within braces in column 2
the same error ><
{"error":"Content-Type header [application/x-www-form-urlencoded] is not support
ed","status":406}curl: (3) [globbing] unmatched brace in column 1
curl: (3) [globbing] empty string within braces in column 2
this is my command: curl "http://localhost:9200/_search" -d '{"query": {"match_all": {}}}' -H 'Content-Type: application/json'
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.