I have a set of Solr documents with children, and each child has a startDate_dt
and an endDate_dt
, and I want my queries to only return valid children, i.e. children for which the current date is between the start date and the end date.
Since I'm already using the ChildDocTransformer I was hoping I'd be able to set the childFilter to a date range in the fl
field:
*, [child parentFilter=docType:"VEHICLE" childFilter=promotion.startDate_dt:[2018-04-03T00:00:00Z TO *] AND promotion.endDate_dt:[* TO 2018-04-03T23:00:00Z]]
But it doesn't seem to work as I'm getting an exception with message error parsing fieldname
.
I tried filtering for a single value, i.e.
*, [child parentFilter=docType:"VEHICLE" childFilter=promotion.startDate_dt:"2018-04-03T00:00:00Z"]
And it works properly, so I'm guessing there's an issue in the syntax I'm using to specify date ranges.
What am I missing? Is there a way to filter child documents by date ranges?