I am facing issue with date range, Here is my query
"filter": {
"script": {
"script": "(min..max).contains(doc.admitted_date.date.year)",
"params": {
"min": 1965,
"max": 2015
}
}
}
When i pass this query it was not work, it was showing all the results, if i am passing "min" : 1971 it was working. This filter is not working with 1970. if i am passing "min":1958 and "max":1969 it was working. when i include 1970, the filter was not working. please help me out to fix this issue.
EDIT :
It will fetch the records from null value. If the admitted_date is null. it will shown in the 1970's records.
Thanks in advance,