Unable to use _bulk API on Elasticsearch on Windows

60 Views Asked by At

I am new to windows . I was working my entire on linux. Can somebody help me here for _bulk api indexing

C:\ELK\master-1\elasticsearch\sample_data>curl -k -H 'Content-Type: application/x-ndjson' -X POST 'https://localhost:9200/bank/_bluk?pretty' -d @accounts.json curl: (6) Could not resolve host: application curl: (3) URL using bad/illegal format or missing URL

1

There are 1 best solutions below

3
llermaly On

I see you typed "_bluk" instad of "_bulk" , also you must use the --data-binary flag instead of d:

curl -s -H "Content-Type: application/x-ndjson" -XPOST localhost:9200/_bulk --data-binary "@accounts.json"

docs: https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html#bulk-curl