_bulk error

Trying to run the following in windows

curl -XPUT '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" -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

--

Fixxed:

curl -XPOST "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/' -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" -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

--

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 :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 1 nov. 2012 à 16:34, Shawn Ritchie xritchie@gmail.com a écrit :

Fixxed:

curl -XPOST "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/' -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" -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

--

C:\curl>curl -XPOST "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 :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 1 nov. 2012 à 16:34, Shawn Ritchie <xrit...@gmail.com <javascript:>> a
écrit :

Fixxed:

curl -XPOST "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/' -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" -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

--

--

curl -XPOST "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/' -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" -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

--