These are chat archives for Automattic/mongoose

24th
May 2016
James Lee
@uptownhr
May 24 2016 01:24
we don't se line 63
Mohamed Nasrullah
@nasr18
May 24 2016 10:51
how to pass only date no time to mongodb via mongoose?
Vasiliy Onoprienko
@Regnised
May 24 2016 11:18
Hello, why l get exception: Unrecognized pipeline stage name: '$sample' in
    getMyVocabularyWords: function (req, res, next) {

        var query = Vocabulary.aggregate(

            [ { $sample: { size: 3 } } ]

        );

        query.exec(function (err, words) {

            if (err) return next(err);

            res.status(200).json({

                success: true,

                words: words

            })

        });

    }
i have latest mongo version - 3.2.6
Vasiliy Onoprienko
@Regnised
May 24 2016 11:51
I solved it! I am was connected to https://mlab.com/ free mongo database. And mongodb in https://mlab.com/ is 3.0 version, i need to 3.2 version for $sample function
Umair Sarfraz
@aquadestructor
May 24 2016 18:31
Hey anybody here?