我的 curl 查询有效
curl -v -XGET 'http://localhost:9200/entityitem/5/_mget' -d '{"ids": ["5000027585", "5000027615"]}'
但是当我使用其他客户端进行 GET 查询时
http://localhost:9200/entityitem/5/_mget?source={"ids": ["5000027585", "5000027615"]}
出现以下错误
Failed to derive xcontent from org.elasticsearch.common.bytes.BytesArray@0
最佳答案
如果您在遵循 kibana 教程时遇到此问题,您可能正在尝试导入 shakespeare.json 文件。您可能下载到下载文件夹并在另一个文件夹中运行导入命令。将输入文件移动到当前目录...
mv ~/Downloads/shakespeare.json .
并运行 curl xput 命令以导入莎士比亚数据。
curl -XPUT localhost:9200/_bulk --data-binary @shakespeare.json
关于elasticsearch - 无法从 org.elasticsearch.common.bytes.BytesArray@0 派生 xcontent,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21394767/