按日期范围筛选Solr子文档

按日期范围筛选Solr子文档,solr,solr-query-syntax,Solr,Solr Query Syntax,我有一组包含子项的Solr文档,每个子项都有一个startDate_dt和一个endDate_dt,我希望我的查询只返回有效的子项,即当前日期介于开始日期和结束日期之间的子项 由于我已经在使用,我希望能够将childFilter设置为fl字段中的日期范围: *, [child parentFilter=docType:"VEHICLE" childFilter=promotion.startDate_dt:[2018-04-03T00:00:00Z TO *] AND promotion.end

我有一组包含子项的Solr文档,每个子项都有一个
startDate_dt
和一个
endDate_dt
,我希望我的查询只返回有效的子项,即当前日期介于开始日期和结束日期之间的子项

由于我已经在使用,我希望能够将childFilter设置为
fl
字段中的日期范围:

*, [child parentFilter=docType:"VEHICLE" childFilter=promotion.startDate_dt:[2018-04-03T00:00:00Z TO *] AND promotion.endDate_dt:[* TO 2018-04-03T23:00:00Z]]
但它似乎不起作用,因为我在解析fieldname时遇到了一个异常消息
error

我尝试过滤单个值,即

*, [child parentFilter=docType:"VEHICLE" childFilter=promotion.startDate_dt:"2018-04-03T00:00:00Z"]
它工作正常,所以我猜我用来指定日期范围的语法有问题


我错过了什么?有没有办法按日期范围筛选子文档?

我相信如果您有多个字段,您需要将childFilter包装在引号中,这样它就会像childFilter=“promotion.startDate\u dt:[您的范围]和promotion.endDate\u dt:[您的范围]”这样更新?面临类似问题