首页
学习
活动
专区
圈层
工具
发布
  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    python实现elastcsearch中timestampe(long)类型的date_histogram聚合测试

    由于老版本的elasticsearch不支持date类型,因此之前的存储(5.0版本)都用了timestamp来进行设计。...当新的es版本(6.0)支持日期date_histogram统计聚合函数时,发现其interval可以设置相当灵活用于设置各种间隔,如下: Here are the valid time specifications...length interval (except for the last second of a minute that contains a leap-second, which is 2000ms long...Multiple years (ny) are not supported 然而对于原先老版本的timestamp如何实现其date_histogram,网上很多说法是无法进行直接的利用。...具体测试脚本如下: (1)写入es,按照long的timestamp类型进行写入 ''' 写入ES ''' def WriteES(): es = Elasticsearch()

    1.4K10
    领券