Hi all! I'm still fairly new to elasticsearch. So far so good until I am
now attempting to use the bulk index API.
I have a PHP script pulling data from an Oracle db, creating a
'bulkIndex.data' file, and I'm trying to index it using:
$cmd = "curl -XPUT http://localhost:9200/_bulk --data-binary
@bulkIndex.data";
exec($cmd);
I'm getting an error:
{"error":"Failed to derive xcontent from org.elasticsearch.common.bytes.ChannelBufferBytesReference@77256a74"}
Here is a sample of the contents of my file:
$ cat bulkIndex.data
{ "index" : {"_index":"test","_type":"mo","_id":"1"} }
{"CDR_ID":"4894","MSISDN":"14169988312","SHORT_CODE":"44446","APP_ID":"1158","OPERATOR_ID":"0","SHORT_MESSAGE":"Test1","SMS_ID":"19f1eb3d1b5579781ba1c051d8d6739e","DATE_TIMESTAMP":"20120727131710","INSERT_TIMESTAMP":"20121129212256"}
{ "index" : {"_index":"test","_type":"mo","_id":"2"} }
{"CDR_ID":"4895","MSISDN":"17059380753","SHORT_CODE":"41128","APP_ID":"1038","OPERATOR_ID":"0","SHORT_MESSAGE":"Test2","SMS_ID":"d8d849f760623f1720ef08634b3867b4","DATE_TIMESTAMP":"20120727131804","INSERT_TIMESTAMP":"20121129212256"}
...
{ "index" : {"_index":"test","_type":"mt","_id":"32030"} }
{"CDR_ID":"56163","MSISDN":"9026290583","SHORT_CODE":"41225","APP_ID":"1038","OPERATOR_ID":"0","SHORT_MESSAGE":"Test32030","SMS_ID":"67709e2f908c072112db7f1c173af0b9","DATE_TIMESTAMP":"20120731215731","INSERT_TIMESTAMP":"20121203172327"}
$
Why am I getting this error? Any help would be greatly appreciated. Thank
you!
--