Reputation: 14717
I am learning Elasticsearch and I run the following in Windows prompt:
curl -XPOST http://127.0.0.1:9200/test-index/_search?size=0&pretty -d @executing_an_aggregation.json
This is the content of executing_an_aggregation.json
{
"query": {
"match_all": {}
},
"aggs": {
"tag": {
"terms": {
"field": "tag",
"size": 10
}
}
}
}
However, I got the following:
{"took":2,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":980,"max_score":0.0,"hits":[]}}'pretty' is not recognized as an internal or external command, operable program or batch file.
Note that 'pretty' is causing errors. How can I get pretty results in Windows?
Thanks!
Upvotes: 1
Views: 2332
Reputation: 52368
Use double-quotes, instead of simple ones. In the definitive guide everything has been tested in Unix-live environment.
curl -XPOST "http://127.0.0.1:9200/blog/_search?size=0&pretty" -d @executing_an_aggregation.json
Upvotes: 2