首页 > 解决方案 > MongoDB聚合allowDiskUse在Spring Boot中不起作用

问题描述

我正在尝试 allowDiskUse 但这也不起作用并且仍然收到警告aggregation result exceeds maximum document size (16mb)

我试过这个,但会再次抛出同样的警告。可能是什么原因?是它会抛出警告但获取结果还是无法获取结果?

Aggregation aggregation = Aggregation.newAggregation(...).withOptions(Aggregation.newAggregationOptions().allowDiskUse(true).build());

标签: javamongodbspring-bootspring-dataaggregation

解决方案


推荐阅读