【发布时间】:2011-10-03 23:13:46
【问题描述】:
我使用以下查询来获取帖子的时间序列数据。
q=*:*&facet=true&facet.date=created_at_d&start=0
&f.created_at_d.facet.date.start=2009-06-20T14:05:28Z
&f.created_at_d.facet.date.end=2011-07-05T14:05:28Z
&f.created_at_d.facet.date.gap=%2B3600SECONDS
&fq=type:Post&rows=0&f.created_at_d.facet.mincount=1
&facet.sort=count
有没有办法在不将 facet.date.start 设置为随机过去日期(比如 100 年)的情况下获取所有时间数据?
All time data => from the created_at of the very first Post.
【问题讨论】:
-
我正忙着在网上搜索相同问题的答案。你当时找到了吗?
-
在 Solr 中没有办法。我们创建了 $posts_first_created_at=Post.first.create_at 来存储 Rails 初始化期间的值。该代码仅在 JVM(我们使用 tomcat/jruby)启动期间运行一次。
标签: solr sunspot sunspot-rails