问题描述
我正在使用NEST(C#)但是我使用的是
我也使用Kibana,但似乎没有正常工作,因为我缺少时间戳记字段。
此外,在我添加此字段后,是否有任何方式可以确认添加该字段?我可以查询这个字段吗?
谢谢!
为文档索引字段可以要为每个文档自动生成。
要启用时间戳,请在映射中添加以下内容:
{
my_mapping:{
_timestamp:{enabled:true,store:true}
}
}
How can I create an Index and Mapping with the timestamp field so each added document will include a timestamp by default.
I am using NEST (C#) but I just cant figure out how to do it.
I am also using Kibana but it seems not to work properly because I am missing the timestamp field.
Also, after I am adding this field, is there any way I can 'confirm' the field is added? can I query this field?
Thanks!
When you index a document a _timestamp field can be automatically generated for each document.
To enable the timestamp, add the following to your mapping:
{
"my_mapping" : {
"_timestamp" : { "enabled" : true, "store" : true }
}
}
这篇关于将时间戳添加到ElasticSearch中添加的每个文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!