开发者

all time data without setting facet.date.start to a random past date

I use the following query to get time-series data of Posts.

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

Is there a way to get all time data w开发者_StackOverflow社区ithout setting facet.date.start to a random past date(say 100 years)?.

All time data => from the created_at of the very first Post.


It's a separate query for solr or your db to find that first date so probably easiest to get from the database.

Post.first(:order => 'created_at ASC').created_at.iso8601
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜