These are chat archives for Automattic/mongoose

Dec 2015
Dec 03 2015 13:16
Hi there! i have a question about populate function. last example on this page ( says i can deep populate objects but this actually doesn't work, is it a bug or i'm doing something wrong
Luke Childs
Dec 03 2015 17:00

@vkarpov15 Thanks for the reply but my ids aren't sequential.

I wanted to order by updated date starting from a specific id. As far as I can tell this isn't possible with Mongoose so instead I'm now doing a .where('updated').lt(aDate) to start from the updated date of the specific document:

var query = Post.find()
if(after) {
James Lee
Dec 03 2015 22:02
when adding in a new "unique" index into a collection where duplicates already exists, do you have to remove the duplicates before the mongoose schema defined "unique" takes affect? Does adding in "dropDups" help at all in this scenario? Help meaning, I don't have to manually remove the dups.
Christopher Shelley
Dec 03 2015 22:04
Hi all, im programming a search feature using mongoose/mongo
I have generated a text index which seems to work fine in the mongo cli client
i can successfully query the index with db.the_list.find( { $text: { $search: "as" } } ) - how would i do the same through my mongoose routes? my original mongoose route which collected the whole collection looks like this listModel.find( … , do I just switch ‘find’ for ‘aggregate’ and pass in the query string?