Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/solr/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache 如何在solr中记录创建时间?_Apache_Solr_Indexing_Dataimporthandler - Fatal编程技术网

Apache 如何在solr中记录创建时间?

Apache 如何在solr中记录创建时间?,apache,solr,indexing,dataimporthandler,Apache,Solr,Indexing,Dataimporthandler,我正在使用DataImportHandler对Postgres中的数据进行索引 我希望获得记录创建时间,以便稍后将其与实际对象创建时间进行比较 这些记录正在更新(通过id),因此添加“NOW”字段不会起作用我最终就是这样做的: 1.使用多值 schema.xml: <field name="creation_time" type="date" indexed="false" stored="true" required="false" multiValued="true" />

我正在使用DataImportHandler对Postgres中的数据进行索引

我希望获得记录创建时间,以便稍后将其与实际对象创建时间进行比较


这些记录正在更新(通过id),因此添加“NOW”字段不会起作用

我最终就是这样做的:

1.使用多值

schema.xml:

<field name="creation_time"  type="date" indexed="false"  stored="true" required="false" multiValued="true" />
解决方案如下:


我最终就是这样做的:

1.使用多值

schema.xml:

<field name="creation_time"  type="date" indexed="false"  stored="true" required="false" multiValued="true" />
解决方案如下:


这里提到的启用Solr时间戳字段:我想要第一个索引时间,而不是最后一个索引时间启用Solr时间戳字段,这里提到的:我想要第一个索引时间,而不是最后一个索引时间
{"creation_time": {"add":"2012-03-06T15:02:45.017Z"}}