gpt4 book ai didi

elasticsearch - 如何在 Elasticsearch 中添加自动创建日期

转载 作者:行者123 更新时间:2023-11-29 02:51:56 24 4
gpt4 key购买 nike

在 2.0 版之前,您需要在您的类型中创建一个字段 _timestamp: https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-timestamp-field.html

不幸的是,这已被弃用。新的替代品是“日期”字段,但必须明确填写。

有没有办法自动生成创建日期?

最佳答案

根据 the breaking changes documentation _timestamp 已弃用,没有专门的替代品:

Instead of the _timestamp field, use a normal date field and set the value explicitly.

这意味着完全由客户来设置文档创建时间。

关于elasticsearch - 如何在 Elasticsearch 中添加自动创建日期,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36199747/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com