title: Error in mapper_parsing_exception on ElasticSearch
body: <p>The server is started on port 3000.</p>
  
  <blockquote>
    <p>Error creating mapping[mapper_parsing_exception] No handler for type
    [string] declared on field [category] ::
    {"path":"/products/_mapping/product","query":{},"body":"{\"product\":{\"properties\":{\"category\":{\"type\":\"string\"},\"name\":{\"type\":\"string\"},\"price\":{\"type\":\"double\"},\"image\":{\"type\":\"string\"}}}}","statusCode":400,"response":"{\"error\":{\"root_cause\":[{\"type\":\"mapper_parsing_exception\",\"reason\":\"No
    handler for type [string] declared on field
    [category]\"}],\"type\":\"mapper_parsing_exception\",\"reason\":\"No
    handler for type [string] declared on field
    [category]\"},\"status\":400}"}</p>
  </blockquote>
  
  <p>connected to database</p>
  
  <p>Indexed 120 documents</p>
  
  <p>//code  </p>
  
  <pre><code>Product.createMapping(function(err, mapping){
  if(err){
      console.log("Error creating mapping"+ err);
  }else{
      console.log("Mapping Cretaed");
      console.log(mapping);
  }
  });
  
  var stream = Product.synchronize();
  var count = 0;
  
  stream.on('data', function(){
      count++;
  });
  stream.on('close', function(){
      console.log("Indexed " + count + "documents");
  });
  stream.on('error', function(err){
      console.log(err);
  });
  </code></pre>
  
  <p>New code added to explain what product is</p>
  
  <pre><code>var mongoose = require("mongoose");
  var Schema   = mongoose.Schema;
  var mongoosastic = require("mongoosastic");
  
  //Schema
  var ProductSchema = new Schema({
      category : {
          type : Schema.Types.ObjectId,
          ref : 'Category'
      },
      name : String,
      price : Number,
      image : String 
  });
  ProductSchema.plugin(mongoosastic, {
      hosts : [
      'localhost:9200'
      ]
  })
  
  module.exports = mongoose.model('Product', ProductSchema);
  </code></pre>