赞
踩
步骤:
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"
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。