取自维基
Although not technically a Syntax difference, please note that if you use
the Solr "DateField" type, any queries on those fields (typically range queries)
should use either the Complete ISO 8601 Date syntax that field supports,
or the DateMath Syntax to get
relative dates. Examples:
timestamp:[* TO NOW]
createdate:[1976-03-06T23:59:59.999Z TO *]
createdate:[1995-12-31T23:59:59.999Z TO 2007-03-06T00:00:00Z]
pubdate:[NOW-1YEAR/DAY TO NOW/DAY+1DAY]
createdate:[1976-03-06T23:59:59.999Z TO 1976-03-06T23:59:59.999Z+1YEAR]
createdate:[1976-03-06T23:59:59.999Z/YEAR TO 1976-03-06T23:59:59.999Z]
NOTE:TO must be uppercase, or Solr will report a 'Range Goop' error.
把它和这个结合起来,工作就完成了:)这很容易,它只需要在开始时进行一些尝试
稍作修改:此方法允许您根据日期范围检索值并根据它们的值对它们应用分数提升。显然你在询问如何根据基本分数和日期检索排序,所以我的答案不是 100% 正确的