问题
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.
Default value was defaults.last_index_time=2016-09-19 14:55:17 .
I need something like
defaults.last_index_time=1474297085558
回答1:
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" />
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.
来源:https://stackoverflow.com/questions/39576281/how-to-change-defaults-last-index-time-format-in-solr