在Solr中了解文档的索引时间 [英] Know indexing time for a document in Solr

查看:184
本文介绍了在Solr中了解文档的索引时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能知道solr中文档的索引时间.就像有一个分数"的隐式字段会自动添加到文档中一样,是否存在一个存储索引时间值的字段?

Is it possible to know the indexing time of a document in solr. Like there is a implicit field for "score" which automatically gets added to a document, is there a field that stores value of indexing time?

我需要它知道文档被编入索引的日期.

I need it to know the date when a document got indexed.

谢谢

推荐答案

Solr不会自动将创建日期添加到文档中.您当然可以使用Solr的

Solr does not automatically add a create date to documents. You could certainly index one with the document though, using Solr's DateField. In earlier versions or Solr ( < 4.2 ), there was a commented timestamp field in the example schema.xml, which looked like:

<field name="timestamp" type="date" indexed="true" stored="true" default="NOW" multiValued="false"/>

此外,我认为值得指出的是,没有隐式的得分"字段.分数是在查询时计算的,而不是与文档捆绑在一起的.不同的查询将为同一文档生成不同的分数.文档中存储了一些准则,这些准则已计入分数,但它们并不是真正的字段.

Also, I think it bears noting that there is no implicit "score" field. Scores are calculated at query time, rather than being tied to the document. Different queries will generate different scores for the same document. There are norms stored with the document that are factored into scores, but they aren't really fields.

这篇关于在Solr中了解文档的索引时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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