Dari dokumen.
Anda dapat melewati batchSize
dengan AggregationOptions
dalam versi Spring Mongo 2.x
Aggregation aggregation = newAggregation(unwind, group).withOptions(newAggregationOptions().cursorBatchSize(100).build());
Dengan ukuran batch default
Aggregation aggregation = newAggregation(unwind, group).withOptions(newAggregationOptions().cursor(new Document()).build());