# \_bulk error

**URL:** <https://discuss.elastic.co/t/-bulk-error/9520>\
**Category:** Elasticsearch\
**Created:** [November 1, 2012, 3:22pm UTC](https://discuss.elastic.co/t/-bulk-error/9520 "2012-11-01T15:22:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kayngee](https://avatars.discourse-cdn.com/v4/letter/k/43a26b/32.png) [@kayngee](https://discuss.elastic.co/u/kayngee)\
**Post date:** [November 1, 2012, 3:22pm UTC](https://discuss.elastic.co/t/-bulk-error/9520/1 "2012-11-01T15:22:43Z")

</div>

_Trying to run the following in windows_

curl -XPUT '[http://localhost:9200/phrase/item/](http://localhost:9200/phrase/item/)' -d "{"index" : { "\_index" :  
"phrasesss"", "\_type" : "itemss"", "\_id" : "101011" }}  
{ "productName" :"the prettiest cool guy on  
earth","productID":"Zeepex","warehouse":"Malta","vendor":"Charonite  
Coporation","productDescription":"test","categories":"Software","stockLevel":100,"cost":1000}  
"  
_Which then i convert to this due to windows versions_

curl -XPOST "[http://localhost:9200/\_bulk](http://localhost:9200/_bulk)" -d "{""index"" : { ""\_index"" :  
""phrasesss"", ""\_type"" : ""itemss"", ""\_id"" : ""101011"" }}\n{  
"productName" :"the prettiest cool guy on  
earth","productID":"Zeepex","warehouse":"Malta","vendor":"Charonite  
Coporation","productDescription":"test","categories":"Software","stockLevel":100,"cost":1000}\n"

_everytime i try this i get the following_

{"error":"ActionRequestValidationException[Validation Failed: 1: no  
requests added;]","status":500}

_Any help on understand this is greatly appreciated._

Regards,  
Shawn

--

---

<div class="post-metadata">

**Author:** ![kayngee](https://avatars.discourse-cdn.com/v4/letter/k/43a26b/32.png) [@kayngee](https://discuss.elastic.co/u/kayngee)\
**Post date:** [November 1, 2012, 3:34pm UTC](https://discuss.elastic.co/t/-bulk-error/9520/2 "2012-11-01T15:34:10Z")

</div>

Fixxed:

curl -XPOST "[http://localhost:9200/phrase/item/](http://localhost:9200/phrase/item/)" -d "{"index" : {}}\n{  
"productName" :"the prettiest cool guy on  
earth","productID":"Zeepex","warehouse":"Malta","vendor":"Charonite  
Coporation","productDescription":"test","categories":"Software","stockLevel":100,"cost":1000}\n"

On Thursday, 1 November 2012 16:22:43 UTC+1, Shawn Ritchie wrote:

> _Trying to run the following in windows_
> 
> curl -XPUT '[http://localhost:9200/phrase/item/](http://localhost:9200/phrase/item/)' -d "{"index" : { "\_index"  
> : "phrasesss"", "\_type" : "itemss"", "\_id" : "101011" }}  
> { "productName" :"the prettiest cool guy on  
> earth","productID":"Zeepex","warehouse":"Malta","vendor":"Charonite  
> Coporation","productDescription":"test","categories":"Software","stockLevel":100,"cost":1000}  
> "  
> _Which then i convert to this due to windows versions_
> 
> curl -XPOST "[http://localhost:9200/\_bulk](http://localhost:9200/_bulk)" -d "{""index"" : { ""\_index"" :  
> ""phrasesss"", ""\_type"" : ""itemss"", ""\_id"" : ""101011"" }}\n{  
> "productName" :"the prettiest cool guy on  
> earth","productID":"Zeepex","warehouse":"Malta","vendor":"Charonite  
> Coporation","productDescription":"test","categories":"Software","stockLevel":100,"cost":1000}\n"
> 
> _everytime i try this i get the following_
> 
> {"error":"ActionRequestValidationException[Validation Failed: 1: no  
> requests added;]","status":500}
> 
> _Any help on understand this is greatly appreciated._
> 
> Regards,  
> Shawn

--

---

<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:** [November 1, 2012, 3:46pm UTC](https://discuss.elastic.co/t/-bulk-error/9520/3 "2012-11-01T15:46:40Z")

</div>

Yes. With windows, it's a pain.  
Consider using a JSON file and pass it to curl using -d @filename (i think it's something like that as far as I remember).

Hth

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 1 nov. 2012 à 16:34, Shawn Ritchie [xritchie@gmail.com](mailto:xritchie@gmail.com) a écrit :

> Fixxed:
> 
> curl -XPOST "[http://localhost:9200/phrase/item/](http://localhost:9200/phrase/item/)" -d "{"index" : {}}\n{ "productName" :"the prettiest cool guy on earth","productID":"Zeepex","warehouse":"Malta","vendor":"Charonite Coporation","productDescription":"test","categories":"Software","stockLevel":100,"cost":1000}\n"
> 
> On Thursday, 1 November 2012 16:22:43 UTC+1, Shawn Ritchie wrote:  
> Trying to run the following in windows
> 
> curl -XPUT '[http://localhost:9200/phrase/item/](http://localhost:9200/phrase/item/)' -d "{"index" : { "\_index" : "phrasesss"", "\_type" : "itemss"", "\_id" : "101011" }}  
> { "productName" :"the prettiest cool guy on earth","productID":"Zeepex","warehouse":"Malta","vendor":"Charonite Coporation","productDescription":"test","categories":"Software","stockLevel":100,"cost":1000}  
> "  
> Which then i convert to this due to windows versions
> 
> curl -XPOST "[http://localhost:9200/\_bulk](http://localhost:9200/_bulk)" -d "{""index"" : { ""\_index"" : ""phrasesss"", ""\_type"" : ""itemss"", ""\_id"" : ""101011"" }}\n{ "productName" :"the prettiest cool guy on earth","productID":"Zeepex","warehouse":"Malta","vendor":"Charonite Coporation","productDescription":"test","categories":"Software","stockLevel":100,"cost":1000}\n"
> 
> everytime i try this i get the following
> 
> {"error":"ActionRequestValidationException[Validation Failed: 1: no requests added;]","status":500}
> 
> Any help on understand this is greatly appreciated.
> 
> ## Regards, Shawn

--

---

<div class="post-metadata">

**Author:** ![kayngee](https://avatars.discourse-cdn.com/v4/letter/k/43a26b/32.png) [@kayngee](https://discuss.elastic.co/u/kayngee)\
**Post date:** [November 1, 2012, 3:54pm UTC](https://discuss.elastic.co/t/-bulk-error/9520/4 "2012-11-01T15:54:54Z")

</div>

C:\curl\>curl -XPOST "[http://localhost:9200/\_bulk](http://localhost:9200/_bulk)" -d  
@"C:\elasticsearch-0.19.11\bulktest.txt"  
{"error":"ActionRequestValidationException[Validation Failed: 1: no  
requests added;]","status":500}

Created a text file with

{"index" : { "\_index" : "phrase", "\_type" : "item", "\_id" : "111" } }  
{"productName" :"the prettiest cool guy on  
earth","productID":"Zeepex","warehouse":"Malta","vendor":"Charonite  
Coporation","productDescription":"test","categories":"Software","stockLevel":100,"cost":1000}  
{"index" : { "\_index" : "phrase", "\_type" : "item", "\_id" : "111" } }  
{"productName" :"the prettiest cool guy on  
earth","productID":"Zeepex","warehouse":"Malta","vendor":"Charonite  
Coporation","productDescription":"test","categories":"Software","stockLevel":100,"cost":1000}  
{"index" : { "\_index" : "phrase", "\_type" : "item", "\_id" : "111" } }  
{"productName" :"the prettiest cool guy on  
earth","productID":"Zeepex","warehouse":"Malta","vendor":"Charonite  
Coporation","productDescription":"test","categories":"Software","stockLevel":100,"cost":1000}  
{"index" : { "\_index" : "phrase", "\_type" : "item", "\_id" : "111" } }  
{"productName" :"the prettiest cool guy on  
earth","productID":"Zeepex","warehouse":"Malta","vendor":"Charonite  
Coporation","productDescription":"test","categories":"Software","stockLevel":100,"cost":1000}  
{"index" : { "\_index" : "phrase", "\_type" : "item", "\_id" : "111" } }  
{"productName" :"the prettiest cool guy on  
earth","productID":"Zeepex","warehouse":"Malta","vendor":"Charonite  
Coporation","productDescription":"test","categories":"Software","stockLevel":100,"cost":1000}  
{"index" : { "\_index" : "phrase", "\_type" : "item", "\_id" : "111" } }  
{"productName" :"the prettiest cool guy on  
earth","productID":"Zeepex","warehouse":"Malta","vendor":"Charonite  
Coporation","productDescription":"test","categories":"Software","stockLevel":100,"cost":1000}  
{"index" : { "\_index" : "phrase", "\_type" : "item", "\_id" : "111" } }  
{"productName" :"the prettiest cool guy on  
earth","productID":"Zeepex","warehouse":"Malta","vendor":"Charonite  
Coporation","productDescription":"test","categories":"Software","stockLevel":100,"cost":1000}

sill getting the same error

On Thursday, 1 November 2012 16:47:00 UTC+1, David Pilato wrote:

> Yes. With windows, it's a pain.  
> Consider using a JSON file and pass it to curl using -d @filename (i think  
> it's something like that as far as I remember).
> 
> Hth
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 1 nov. 2012 à 16:34, Shawn Ritchie \<[xrit...@gmail.com](mailto:xrit...@gmail.com) \<javascript:\>\> a  
> écrit :
> 
> Fixxed:
> 
> curl -XPOST "[http://localhost:9200/phrase/item/](http://localhost:9200/phrase/item/)" -d "{"index" : {}}\n{  
> "productName" :"the prettiest cool guy on  
> earth","productID":"Zeepex","warehouse":"Malta","vendor":"Charonite  
> Coporation","productDescription":"test","categories":"Software","stockLevel":100,"cost":1000}\n"
> 
> On Thursday, 1 November 2012 16:22:43 UTC+1, Shawn Ritchie wrote:
> 
> > _Trying to run the following in windows_
> > 
> > curl -XPUT '[http://localhost:9200/phrase/item/](http://localhost:9200/phrase/item/)' -d "{"index" : {  
> > "\_index" : "phrasesss"", "\_type" : "itemss"", "\_id" : "101011" }}  
> > { "productName" :"the prettiest cool guy on  
> > earth","productID":"Zeepex","warehouse":"Malta","vendor":"Charonite  
> > Coporation","productDescription":"test","categories":"Software","stockLevel":100,"cost":1000}  
> > "  
> > _Which then i convert to this due to windows versions_
> > 
> > curl -XPOST "[http://localhost:9200/\_bulk](http://localhost:9200/_bulk)" -d "{""index"" : { ""\_index""  
> > : ""phrasesss"", ""\_type"" : ""itemss"", ""\_id"" : ""101011"" }}\n{  
> > "productName" :"the prettiest cool guy on  
> > earth","productID":"Zeepex","warehouse":"Malta","vendor":"Charonite  
> > Coporation","productDescription":"test","categories":"Software","stockLevel":100,"cost":1000}\n"
> > 
> > _everytime i try this i get the following_
> > 
> > {"error":"ActionRequestValidationException[Validation Failed: 1: no  
> > requests added;]","status":500}
> > 
> > _Any help on understand this is greatly appreciated._
> > 
> > Regards,  
> > Shawn
> 
> --

--

---

<div class="post-metadata">

**Author:** ![kayngee](https://avatars.discourse-cdn.com/v4/letter/k/43a26b/32.png) [@kayngee](https://discuss.elastic.co/u/kayngee)\
**Post date:** [November 1, 2012, 3:56pm UTC](https://discuss.elastic.co/t/-bulk-error/9520/5 "2012-11-01T15:56:10Z")

</div>

curl -XPOST "[http://localhost:9200/\_bulk](http://localhost:9200/_bulk)" --data-binary  
@"C:\elasticsearch-0.19.11\bulktest.txt"

ISSUE SOLVED

On Thursday, 1 November 2012 16:22:43 UTC+1, Shawn Ritchie wrote:

> _Trying to run the following in windows_
> 
> curl -XPUT '[http://localhost:9200/phrase/item/](http://localhost:9200/phrase/item/)' -d "{"index" : { "\_index"  
> : "phrasesss"", "\_type" : "itemss"", "\_id" : "101011" }}  
> { "productName" :"the prettiest cool guy on  
> earth","productID":"Zeepex","warehouse":"Malta","vendor":"Charonite  
> Coporation","productDescription":"test","categories":"Software","stockLevel":100,"cost":1000}  
> "  
> _Which then i convert to this due to windows versions_
> 
> curl -XPOST "[http://localhost:9200/\_bulk](http://localhost:9200/_bulk)" -d "{""index"" : { ""\_index"" :  
> ""phrasesss"", ""\_type"" : ""itemss"", ""\_id"" : ""101011"" }}\n{  
> "productName" :"the prettiest cool guy on  
> earth","productID":"Zeepex","warehouse":"Malta","vendor":"Charonite  
> Coporation","productDescription":"test","categories":"Software","stockLevel":100,"cost":1000}\n"
> 
> _everytime i try this i get the following_
> 
> {"error":"ActionRequestValidationException[Validation Failed: 1: no  
> requests added;]","status":500}
> 
> _Any help on understand this is greatly appreciated._
> 
> Regards,  
> Shawn

--

---

<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 6, 2017, 3:06am UTC](https://discuss.elastic.co/t/-bulk-error/9520/6 "2017-07-06T03:06:34Z")

</div>


