Solr 6 how to use dateRange math with localParam op

157 Views Asked by At

1) I have a dateRange type field in solr 6, It contains date ranges.

2) following query will give all the matching record which has date range from 1st jan 2017 To 31st dec 2017.

fq={!field f=dateRange op=Contains}[2017 TO 2017]

3) Following 2 queries are also working

fq=dateRange:[* TO NOW-1DAY]

fq={!field f=dateRange op=Contains}[2017-07-08 TO 2017-08-21]

My Question is :

Now I wants to fetch all date range from 1st Jan 2017 to 2017 -1DAY I have tried with following query but getting error.

fq={!field f=dateRange op=Contains}[2017 TO 2017-1DAY]

"msg":"Couldn't parse date because: Improperly formatted date: 2017-1DAY",

Why dateRange math with localParam op is not working?

0

There are 0 best solutions below