I want to query my mongo db and retrieve all the documents where their dates contain some value.
for example: my input is x = "17" , the query will return all the documents where the field date contains the string 17 . (08/03/2017) for example
I am using Criteria.where("date").regex("." + x + "."); This doesn't work (it only works on string fields)