简体   繁体   English

solr的索引时间(持续时间)

[英]indexing time(duration) in solr

I have data about videos that I would like to index in Solr. 我有要在Solr中建立索引的视频数据。 One of the fields I want to use for faceting is "runtime". 我想用于构面的字段之一是“运行时”。 Is there a specific field type for time durations, as I don't think the Date type would be the correct usage. 是否存在持续时间的特定字段类型,因为我认为Date类型不是正确的用法。 Worst case scenario is I translate the runtime into seconds, but I'd love Solr to be able to handle a time duration natively. 最坏的情况是我将运行时间转换为秒,但我希望Solr能够本地处理持续时间。

I don't think Solr has duration field type, or anything that could mimic that like ie. 我不认为Solr具有持续时间字段类型,也没有可以模拟的字段,例如ie。 time field type. 时间字段类型。

Documentation Field Types Included with Solr Solr随附的文档字段类型

Your idea of converting runtime to seconds sounds very reasonable to me. 您将运行时转换为秒的想法对我来说很合理。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM