Possible issue at Bulk indexing


(vineeth mohan) #1

vineeth@vineeth-XPS-L501X:~/Documents$ cat sample.json
{ "index" : { "_index" : "test", "_type" : "type1" } }
{"XYZ" : "ABC" },

vineeth@vineeth-XPS-L501X:~/Documents$ curl -XPOST '
http://localhost:9200/test/_search' @sample.json
{"took":1,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":1,"max_score":1.0,"hits":[{"_index":"test","_type":"type1","_id":"IUjJevlhQcGy6qz92ViW6g","_version":1,"_score":1.0,
"_source" : {"XYZ" : "ABC" },}]}}

The obtained JSON is not well formed as there is a extra comma.
The same extra comma is there at sample.json too
but then ES did not negative validated it.

Thanks
Vineeth


(Shay Banon) #2

You post the bulk request to the search API?

On Friday, January 27, 2012 at 6:30 PM, Vineeth Mohan wrote:

vineeth@vineeth-XPS-L501X:~/Documents$ cat sample.json
{ "index" : { "_index" : "test", "_type" : "type1" } }
{"XYZ" : "ABC" },

vineeth@vineeth-XPS-L501X:~/Documents$ curl -XPOST 'http://localhost:9200/test/_search' @sample.json
{"took":1,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":1,"max_score":1.0,"hits":[{"_index":"test","_type":"type1","_id":"IUjJevlhQcGy6qz92ViW6g","_version":1,"_score":1.0, "_source" : {"XYZ" : "ABC" },}]}}

The obtained JSON is not well formed as there is a extra comma.
The same extra comma is there at sample.json too
but then ES did not negative validated it.

Thanks
Vineeth


(vineeth mohan) #3

Actually i did it to _bulk itself
But the issue remains.

Thanks
VIneeth

On Sat, Jan 28, 2012 at 2:49 AM, Shay Banon kimchy@gmail.com wrote:

You post the bulk request to the search API?

On Friday, January 27, 2012 at 6:30 PM, Vineeth Mohan wrote:

vineeth@vineeth-XPS-L501X:~/Documents$ cat sample.json
{ "index" : { "_index" : "test", "_type" : "type1" } }
{"XYZ" : "ABC" },

vineeth@vineeth-XPS-L501X:~/Documents$ curl -XPOST '
http://localhost:9200/test/_search' @sample.json
{"took":1,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":1,"max_score":1.0,"hits":[{"_index":"test","_type":"type1","_id":"IUjJevlhQcGy6qz92ViW6g","_version":1,"_score":1.0,
"_source" : {"XYZ" : "ABC" },}]}}

The obtained JSON is not well formed as there is a extra comma.
The same extra comma is there at sample.json too
but then ES did not negative validated it.

Thanks
Vineeth


(system) #4