es查询时间戳java,将时间戳添加到ElasticSearch中添加的每个文档

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 }

}

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值