Cuando use Spring Data MongoDB, creo que, en general, querrá usar Pageable
interfaz para estas consultas. Ejemplo:
@Query("{status: 'Failed'}")
List<Record> findFailedRecords(Pageable pageable);
// or even better without the @Query annotation just:
List<Record> findByStatus(String status, Pageable pageable);
Luego, para llamar:
yourRecordRepo.findFailedRecords(new PageRequest(0, 10));
// or using the other method:
yourRecordRepo.findByStatus("Failed", new PageRequest(0, 10));
Eso obtendrá la primera página de 10 registros fallidos.