【问题标题】:Elasticsearch bulk index "mapper_parsing_exception"Elasticsearch 批量索引“mapper_parsing_exception”
【发布时间】:2016-06-23 07:11:06
【问题描述】:

我正在尝试使用 jq 批量索引,但遇到了问题。

我使用终端输入以下内容(我使用的是 Ubuntu 16.04)

cat practice.json | jq -c '.[] | {"index": {"_index": "text", "_type": "text", "_id": "text"}}, .' | curl -XPOST localhost:9200/_bulk --data-binary @-

这是我得到的错误:

{"type":"mapper_parsing_exception","reason":"failed to parse","caused_by":{"type":"not_x_content_exception","reason":"not_x_content_exception: Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes"}}}}

奇怪的是,我能够获得类似的代码(我忘记保存我所做的,但我认为它与此相同)工作。我在这里或其他地方找不到有同样问题的人。关于如何解决这个问题的任何想法?

【问题讨论】:

  • 能否告知您的practice.json的内容?

标签: elasticsearch jq


【解决方案1】:

这听起来像是发送给 jq 的文档的问题。 ElasticSearch 要求最外层的文档是 JSON 对象,而不是 JSON 数组或标量值。只要确保它是...

看看这个:ElasticSearch error while sending data

【讨论】:

    猜你喜欢
    • 2016-04-16
    • 1970-01-01
    • 1970-01-01
    • 2015-08-07
    • 1970-01-01
    • 2016-01-25
    • 1970-01-01
    • 1970-01-01
    • 2016-02-12
    相关资源
    最近更新 更多