【发布时间】:2019-01-17 19:18:13
【问题描述】:
在旧的 Lucene 版本中,构建日期范围查询很容易:
query = NumericRangeQuery.newLongRange(name, startDate(null if not), endDate(null if not), includeStart, includeEnd);
我切换到 Lucene 7 (lucene-core 7.3.1),但找不到可以接受我的日期为 long(date.getTime()) 的相应查询类型:(
有人可以帮忙吗?我尝试了 TermRangeQuery,但它只将字符串作为构造函数参数。
谢谢
【问题讨论】:
标签: java lucene range-query