In Hibernate search 5 I was using this code for date filter and it was working fine
String from = "2022-01-31"; String to ="2022-03-16"; TermRangeQuery.newStringRange(filter.getKey(), from, to, true, true)
When migrating it to hibernate search 6 we have converted code like this but it is giving exception
String from = "2022-01-31"; String to ="2022-03-16"; pf.range().field(filter.getKey()).between(from, to)
Unable to convert DSL argument: Cannot cast java.lang.String to java.util.Date
Any reason why we are getting this exception??