# Unable to Index: Elasticsearch 2.3.0:Windows 10

**URL:** <https://discuss.elastic.co/t/unable-to-index-elasticsearch-2-3-0-windows-10/46246>\
**Category:** Elasticsearch\
**Created:** [April 4, 2016, 2:13pm UTC](https://discuss.elastic.co/t/unable-to-index-elasticsearch-2-3-0-windows-10/46246 "2016-04-04T14:13:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![seeni](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@seeni](https://discuss.elastic.co/u/seeni)\
**Post date:** [April 4, 2016, 2:13pm UTC](https://discuss.elastic.co/t/unable-to-index-elasticsearch-2-3-0-windows-10/46246/1 "2016-04-04T14:13:22Z")

</div>

Hi ,

I am unable to do -XPUT. please guide me on how I can do it.. below is the screenshot of the error message.

C:\>curl -XPUT "localhost:9200/megacorp/employee/1" { "first\_name" : "John", "last\_name" : "Smith", "age" : "25","about" : "I love to go rock climbing","interests" : ["sports","music"] }  
{"error":{"root\_cause":[{"type":"mapper\_parsing\_exception","reason":"failed to parse, document is empty"}],"type":"mapper\_parsing\_exception","reason":"failed to parse, document is empty"},"status":400}curl: (3) [globbing] unmatched brace in column 1  
curl: (6) Could not resolve host: first\_name

Length Required
## Length Required

* * *

HTTP Error 411. The request must be chunked or have a content length.

curl: (6) Could not resolve host: John, curl: (6) Could not resolve host: last\_name Length Required
## Length Required

* * *

HTTP Error 411. The request must be chunked or have a content length.

curl: (6) Could not resolve host: Smith, curl: (6) Could not resolve host: age Length Required
## Length Required

* * *

HTTP Error 411. The request must be chunked or have a content length.

curl: (6) Could not resolve host: 25,about Length Required
## Length Required

* * *

HTTP Error 411. The request must be chunked or have a content length.

curl: (6) Could not resolve host: I love to go rock climbing,interests Length Required
## Length Required

* * *

HTTP Error 411. The request must be chunked or have a content length.

curl: (3) [globbing] bad range in column 6 curl: (3) [globbing] unmatched close brace/bracket in column 1

---

<div class="post-metadata">

**Author:** ![MarkOStewart](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@MarkOStewart](https://discuss.elastic.co/u/MarkOStewart)\
**Post date:** [April 4, 2016, 2:55pm UTC](https://discuss.elastic.co/t/unable-to-index-elasticsearch-2-3-0-windows-10/46246/2 "2016-04-04T14:55:45Z")

</div>

Your curl string was not correct. I put into sense and made it work and copied back to curl

Try this  
curl -XPUT "[http://localhost:9200/megacorp/employee/1](http://localhost:9200/megacorp/employee/1) " -d'  
{ "first\_name" : "John", "last\_name" : "Smith", "age" : "25","about" : "I love to go rock climbing","interests" : ["sports","music"] }'

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 4, 2016, 3:07pm UTC](https://discuss.elastic.co/t/unable-to-index-elasticsearch-2-3-0-windows-10/46246/3 "2016-04-04T15:07:24Z")

</div>

Curl on windows is just a pain.

IIRC you have to create a json file and pass it to the command line. `-d` was not working for me.

I'd really suggest using [SENSE](https://www.elastic.co/guide/en/sense/current/index.html) or any browser plugin like REST Console.

---

<div class="post-metadata">

**Author:** ![Youxu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youxu/32/117375_2.png) [@Youxu](https://discuss.elastic.co/u/Youxu)\
**Post date:** [April 7, 2016, 3:24am UTC](https://discuss.elastic.co/t/unable-to-index-elasticsearch-2-3-0-windows-10/46246/4 "2016-04-07T03:24:00Z")

</div>

Yes, curl on windows not work well.  
So I run curl in Cygwin 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:01pm UTC](https://discuss.elastic.co/t/unable-to-index-elasticsearch-2-3-0-windows-10/46246/5 "2017-07-05T23:01:40Z")

</div>


