Is there a way to add allowDiscUse: true when using jongo to queri MongoDB? I found out that such error - Sort exceeded memory limit of 104857600 bytes, but did not opt in to external sorting. Aborting operation. Pass allowDiskUse:true to opt in can be prevented in such a way, that your aggregate looks like
aggregate([{$sort:...},{$$skip:...}...],{allowDiscUse: true})but as far as I see Aggregate class in Jongo only applies pipeline to itself, which you can then execute with as method.
MongoCollection catalogCollection = mongoHolder.getCatalogJongo(param.id, false);
Aggregate aggregation = catalogCollection.aggregate("{$match: #}", query.build());
aggregation.and("{$skip: #}", param.offset);
aggregation.and("{$limit: #}", param.limit);
List<BasicDBObject> result = aggregation.as(BasicDBObject.class);Is there any way of passing that parameter to mongo without switching from Jongo to something else?
--
You received this message because you are subscribed to the Google Groups "Jongo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jongo-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.