I'm using Mongodb go driver and still figuring out how to aggregate. My question is, if I use []bson.M as pipelines as shown by the code below:
    collection.Aggregate(
    ctx,
    []bson.M{
        bson.M{
            "$match": filter,
        },
        bson.M{
            "$sort": sort,
        },
    },
)
Is it certain that the match is always first before the sort? Should I switch to mongo.Pipeline ([]bson.D) instead for 100% maintained order? thanks