title: mongo db text search with mongoose
body: <p>I'm using mongo db nodejs and mongoose.</p>
  
  <p>I would like to use mongodb new text search. </p>
  
  <p>Trying to use mongoose-text-search like aaronheckmann advised but I keep getting an error.</p>
  
  <pre><code>var mongoose = require("mongoose");
  var Schema  = mongoose.Schema;
  var ObjectId = Schema.ObjectId;
  var Items = new Schema({
     type            : { type : String , default:""},
      color           : { type : [String] , default:""},
     category_A      : { type : String , default:""},
      category_B      : { type : String , default:""},
      category_C      : { type : String , default:""},
  });
  var textSearch = require("mongoose-text-search");
  Items.plugin(textSearch);
  var ItemModel = mongoose.model('Item', Items);
  Items.index({
      type            :"text",
      color           :"text",
     category_A      :"text",
      category_B      :"text",
      category_C      :"text"
  },
     {
          name: "best_match_index",
         weights: {
              type: 5,  
              color:   4,
        }
      }
  )
  ItemModel.textSearch('D', function (err, output) {
      if (err) 
      console.log(err);
      else
      console.log(output)
  })
  </code></pre>
  
  <p>When running this I get:</p>
  
  <pre><code>no text index for: db.items
  </code></pre>
  
  <p>Thanks!</p>