如何更改solr中的defaults.last_index_time格式 [英] How to change defaults.last_index_time format in solr

查看:547
本文介绍了如何更改solr中的defaults.last_index_time格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Apache Solr 6.2,需要一个时间戳记为defaults.last_index_time字段,或者需要单独的字段用于Core配置。

I am using Apache Solr 6.2, and need a timestamp for defaults.last_index_time field or need separate field for a Core config.

默认值为 .last_index_time = 2016-09-19 14:55:17

我需要像

defaults.last_index_time=1474297085558


推荐答案

使用属性写入器更改 last_index_time 格式in solr.将元素添加到DIH配置文件,直接在dataConfig元素下

Use Property Writer to change last_index_time format in solr.Add the element to the DIH configuration file, directly under the dataConfig element

<propertyWriter dateFormat="yyyy-MM-dd'T'HH:mm:ss.SSSXXX" type="SimplePropertiesWriter"  />

在属性编写器中,您可以指定所需的格式。但是,因为它似乎你想要的日期以毫秒为单位。因为没有dateFormat可用。

In Property Writer you can specify your desired format. But as it seems you want date in milliseconds. As there is no dateFormat available for that.

这篇关于如何更改solr中的defaults.last_index_time格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆