mongodb-erlang icon indicating copy to clipboard operation
mongodb-erlang copied to clipboard

Exceeded memory limit for $group, but didn't allow external sort. Pass allowDiskUse:true

Open Vkutovoy92 opened this issue 2 years ago • 0 comments

How to send "allowDiskUse:true" in mongo_api:aggregate? Without this my req is failed.

-spec aggregate(atom() | pid(), collection(), bson:document(), integer()) -> {ok, cursor()} | []. aggregate(Topology, Collection, Pipeline, Batchsize) -> mongoc:transaction_query(Topology, fun(Conf = #{pool := Worker}) -> Query = mongoc:aggregate_query(Conf, Collection, Pipeline, Batchsize), mc_worker_api:command(Worker, Query) end, #{}).

Maybe is exists another way?

Vkutovoy92 avatar Jul 06 '22 09:07 Vkutovoy92