概述
步骤:
1.创建pipeline
PUT _ingest/pipeline/my_timestamp_pipeline
{
"description": "Adds a field to a document with the time of ingestion",
"processors": [
{
"set": {
"field": "ingest_timestamp",
"value": "{{_ingest.timestamp}}"
}
}
]
}
情况1,新建表加pipeline
PUT test111
{
"settings": {
"index":{
"number_of_shards" : 3,
"number_of_replicas" : 1,
"blocks.read_only_allow_delete": "false",
"default_pipeline": "my_timestamp_pipeline"
}
},
"mappings": {
"properties": {
"addbigint1": {
"type": "long"
}}}
情况2.给已存在索引加时间戳
PUT /testme/_settings
{
"default_pipeline": "my_timestamp_pipeline"
}
最后
以上就是超帅小海豚为你收集整理的es之pipeline给索引加时间戳的全部内容,希望文章能够帮你解决es之pipeline给索引加时间戳所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复