title: mongodb using node js returning [ ] in response during a full text search
body: <p>I'm using mongo with node js &amp; want to get the data for full-text search. But currently getting an empty array <code>[]</code> in return.</p>
  
  <p><strong><em>My API request is as follows -</em></strong></p>
  
  <pre><code>router.post('/products/search', function(req, res, next) { 
      var search=req.body.search;
      console.log(search)
      Product.find({$text:{$search:search}},function(err,data)
      {
          console.log(data)
          res.send(data)  
      });
  });
  </code></pre>
  
  <p><strong><em>And the database code is as follows -</em></strong></p>
  
  <pre><code>var ProductSchema = new Schema({
      category: String,
      name: String,
      price: Number,
      cover: String,
      search:String
  })
  </code></pre>
  
  <p>Please help me to get the data.</p>