elasticsearch - 无法从 org.elasticsearch.common.bytes.BytesArray@0 派生 xcontent

标签 elasticsearch

我的 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/

相关文章:

search - Elasticsearch copy_to字段更新流程

Azure webapp 到 elasticsearch,有时在 azure 上为 "A connection attempt failed"

groovy - Elasticsearch 如何在更新中使用脚本(文件)

elasticsearch - 如果原始模式中未定义新的 Elasticsearch 类型,如何不创建它?

windows - 在 Windows 上安装 PacketBeat

pdf - 使用 ElasticSearch 和/或 Solr 作为 MS Office 和 PDF 文档的数据存储

php - 如何在ElasticSearch中合并2个索引上的结果?

ruby-on-rails - 是否可以在本地重现429错误(请求过多)?

Elasticsearch - 如何存储数据,嵌套或数组?

elasticsearch - 多级嵌套查询 - RequestError 异常 400 - 创建查询失败