对于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}}"
}
}
]
}下级单据添加创建时间方便吗?
发布于 2019-11-30 19:07:31
它在go中的使用无效,但错误没有打印出来。打印错误后,发现索引实际上并未发生。修复该问题后,索引现在可以正常工作。管道对父文档和子文档都有效。
https://stackoverflow.com/questions/59046617
复制相似问题