I am wondering how I can search between by dates in Hibernate Search using Range-Query or is there any filter I have to implement.Following is my field in Record Entity
You should use a range query using from and to.
query = monthQb
.range()
.onField( "startTS" ).ignoreFieldBridge()
.from( DateTools.dateToString( from, DateTools.Resolution.MILLISECOND ) )
.to( DateTools.dateToString( to, DateTools.Resolution.MILLISECOND ) ).excludeLimit()
.createQuery();
The ignoreFieldBridge is needed since you create the string based search string yourself using DateTools.