Litote/kmongo

Add support to pass options to aggregate query (hint and allowDiskUse)

bahaa-kallas opened this issue · 0 comments

Current State
Currently Kmongo only supports passing the pipeline to aggregate function.

Disired State
aggregate function should accepts a pipeline and an options parameter containing the ones included in the code snippet below.

db.getCollection("some-collection").aggregate(
    [
       // stages of the pipeline
    ], 
    {
        "allowDiskUse": true,
        "hint" : "someAscIndex_1"
    }
);

UPDATE:

I don't know how I couldn't find these options provided on the returned type when I wrote this 🙈. But now that I found them. I am closing this issue.