4
我使用以下查詢來獲取Posts的時間序列數據。所有時間數據沒有將facet.date.start設置爲隨機過去日期
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.
我忙於在網絡上搜索相同問題的答案。那時你有沒有找到一個? – Tim
Solr沒有辦法。我們在rails初始化期間創建了$ posts_first_created_at = Post.first.create_at來存儲值。該代碼在JVM(我們使用tomcat/jruby)啓動時只運行一次。 –