mongoosejs / mongoose-text-search

MongoDB 2.4 text search support for mongoose
154 stars 9 forks source link

Does not work with Mongoose 3.8.12 + Plugin setup #8

Closed coreylight closed 7 years ago

coreylight commented 10 years ago

I attempted to follow the example of:

gameSchema.plugin(textSearch);

But the only thing that worked for me was to run the schema through the plugin instead, after declaring extra statics such as:

gameSchema.statics = {
   load: function (id, cb) {//code here}
};

textSearch(gameSchema);