Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to derive xcontent from org.elasticsearch.common.bytes.BytesArray@0

My curl query works

curl -v -XGET 'http://localhost:9200/entityitem/5/_mget' -d '{"ids" : ["5000027585", "5000027615"]}'

but when I use the rest client to do GET query

http://localhost:9200/entityitem/5/_mget?source={"ids" : ["5000027585", "5000027615"]}

I get the following error

Failed to derive xcontent from org.elasticsearch.common.bytes.BytesArray@0

like image 714
ninjaturtle Avatar asked Jan 28 '14 00:01

ninjaturtle


2 Answers

If you get this while following the kibana tutorial you may be trying to import the shakespeare.json file. You probably downloaded to downloads folder and are running the import command in another folder. Move the input file to the current directory...

mv ~/Downloads/shakespeare.json .

and run your curl xput command to import the shakespeare data.

curl -XPUT localhost:9200/_bulk --data-binary @shakespeare.json 
like image 67
Darby Avatar answered Nov 11 '22 18:11

Darby


Yeah. It's an issue.

I just fixed it yesterday. See https://github.com/elasticsearch/elasticsearch/issues/4892

like image 3
dadoonet Avatar answered Nov 11 '22 18:11

dadoonet