第一步,创建PIPLINE(只需要执行一次)
curl -XPUT 'localhost:9200/_ingest/pipeline/timestamp' -H 'Content-Type: application/json' -d '
{
"description": "Creates a timestamp when a document is initially indexed",
"processors": [
{
"set": {
"field": "_source.@timestamp",
"value": "{{_ingest.timestamp}}"
}
}
]
}
'
第二步,修改Index配置,绑定第一步的PIPLINE
curl -X PUT "192.168.37.88:9200/smhy_userinfo/_settings" -H 'Content-Type: application/json' -d '
{
"default_pipeline": "timestamp"
}‘
线上版本6.3.0,创建pipeline 没有问题,绑定出错
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "unknown setting [index.default_pipeline] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
}
],
"type": "illegal_argument_exception",
"reason": "unknown setting [index.default_pipeline] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
},
"status": 400
}
但本地用了6.8.8是完全可以的。是6.3.0是没有这个属性吗