Litote / kmongo

[deprecated] KMongo - a Kotlin toolkit for Mongo
https://litote.org/kmongo/
Apache License 2.0
781 stars 74 forks source link

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

Closed bahaa-kallas closed 1 year ago

bahaa-kallas commented 1 year ago

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.