本文介绍了Solr 获取日期范围的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,我正在编写一些方法来返回 solr 文档,这些 solr 文档具有间隔日期范围.文档以 ISO 8601 格式存储日期字段.

Well, i'm coding some methods for returning solr docs that mach a interval date range.Docs stored date fields with ISO 8601 format.

有什么想法吗?

谢谢

推荐答案

查看 SOLR wiki 对于一些文档和示例:

Check in the SOLR wiki for some docs and examples:

时间戳:[* TO NOW]

创建日期:[1976-03-06T23:59:59.999Z TO *]

createdate:[1976-03-06T23:59:59.999Z TO *]

创建日期:[1995-12-31T23:59:59.999Z 到 2007-03-06T00:00:00Z]

createdate:[1995-12-31T23:59:59.999Z TO 2007-03-06T00:00:00Z]

发布日期:[NOW-1YEAR/DAY TO NOW/DAY+1DAY]

pubdate:[NOW-1YEAR/DAY TO NOW/DAY+1DAY]

创建日期:[1976-03-06T23:59:59.999Z 到 1976-03-06T23:59:59.999Z+1YEAR]

createdate:[1976-03-06T23:59:59.999Z TO 1976-03-06T23:59:59.999Z+1YEAR]

创建日期:[1976-03-06T23:59:59.999Z/YEAR TO 1976-03-06T23:59:59.999Z]

createdate:[1976-03-06T23:59:59.999Z/YEAR TO 1976-03-06T23:59:59.999Z]

希望这有帮助,大卫.

这篇关于Solr 获取日期范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 11:39