diff --git a/menas/src/main/scala/za/co/absa/enceladus/menas/repositories/MongoRepository.scala b/menas/src/main/scala/za/co/absa/enceladus/menas/repositories/MongoRepository.scala index 5d4aaeb7c..3aea034be 100644 --- a/menas/src/main/scala/za/co/absa/enceladus/menas/repositories/MongoRepository.scala +++ b/menas/src/main/scala/za/co/absa/enceladus/menas/repositories/MongoRepository.scala @@ -48,7 +48,7 @@ abstract class MongoRepository[C](mongoDb: MongoDatabase)(implicit ct: ClassTag[ } def count(): Future[Long] = { - collection.countDocuments().toFuture() + collection.estimatedDocumentCount().toFuture() } private[repositories] def getNameFilter(name: String): Bson = {