如何更改 solr 最后一个索引的格式



我想执行增量导入,我需要将我的更新日期与 Solr 的last_index_time进行比较。 所以我有一个问题,无法与两种不同的格式进行比较,我的更新日期格式是 2019-01-29T05:06:02.192Z 但是 Solr last_index_Time格式是 2019-01-30 10:07:58,所以,我想在我的对象日期格式中更改我的 solr last_index_time 格式。谁能帮我?

通常,propertyWriter 用于更改 SOLR (SOLR-2658) 中的last_index_time格式

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

注意:此外,这会将<propertyWriter />元素添加到 DIH 的数据配置.xml文件中,允许用户指定"data-config.properties"文件的位置、文件名和区域设置。

最新更新