开发者

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

开发者 https://www.devze.com 2023-03-20 01:06 出处:网络
I use the following query to get time-series data of Posts. q=*:*&facet=true&facet.date=created_at_d&start=0

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

精彩评论

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

关注公众号