【问题标题】:ElasticSearch Bulk with ingest plugin带有摄取插件的 ElasticSearch Bulk
【发布时间】:2017-07-26 16:09:16
【问题描述】:

我在管道中使用附件处理器Attachment Processor

一切正常,但我想做多个帖子,然后我尝试使用bulk API。 批量工作也很好,但我找不到如何发送 url 参数“pipeline=attachment”。

这把作品:

POST testindex/type1/1?pipeline=attachment
{
  "data": "Y291Y291",
  "name" : "Marc",
  "age" : 23
}

这个批量有效:

POST _bulk
{ "index" : { "_index" : "testindex", "_type" : "type1", "_id" : "2" } }
{ "name" : "jean", "age" : 22 }

但是我怎样才能用他的数据字段批量索引 Marc 以被管道插件理解?

【问题讨论】:

标签: elasticsearch bulkinsert elasticsearch-plugin


【解决方案1】:

感谢 Val 的评论,我做到了,而且效果很好:

POST _bulk
{ "index" : { "_index" : "testindex", "_type" : "type1", "_id" : "2", "pipeline": "attachment"} } }
{"data": "Y291Y291", "name" : "jean", "age" : 22}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-06-18
    • 2023-03-06
    • 1970-01-01
    • 2017-06-25
    • 1970-01-01
    • 2018-06-03
    • 2017-04-22
    • 1970-01-01
    相关资源
    最近更新 更多