mongoose-partial-search
v1.0.6
Published
Downloads
95
Readme
const plugin = require('mongoose-partial-search');
const mongoose = require('mongoose');
const Schema = new mongoose.Schema({
name: {
type: String,
searchable: true,
}
});
Schema.plugin(plugin);
const Model = mongoose.model('foo', Schema);
const query = Model.searchBuilder('bar');
// then, use the query however you like.