MongoRepository JSON Date Query (Spring)
问题 I am trying to use make my own query for a mongo Repository: @Repository public interface LogEntryRepository extends MongoRepository<LogEntry,String> { @Query("{'created_at' : {{ $gte: ISODate(?0)},{$lt: ISODate(?1)}}, " + "$or: [{'site': {$regex: ?2}}, {'login': {$regex: ?2}}, {'ip': {$regex: ?2}} ]" + "}") public Page<LogEntry> findByDateTimeBetweenAndCriteria(String isoStartDate, String isoEndDate, String searchTerm, Pageable page); } What I'd like to achieve is searching though dated logs