带有摄取插件的 ElasticSearch Bulk

ElasticSearch Bulk with ingest plugin

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

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

这个 put 有效 :

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 以供管道插件理解?

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

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