【发布时间】:2019-11-30 19:07:31
【问题描述】:
对于Elasticsearch中的一个父子关系索引,案例中的父子文档不是同时添加的。父文档存在后,可以添加新的子文档。
按照Automatically adding a timestamp to documents 中描述的步骤,发现ingest_timestamp 字段已添加到父文档中,但它不适用于子文档索引。
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}}"
}
}
]
}
给子文档增加创建时间方便吗?
【问题讨论】:
标签: elasticsearch timestamp parent-child