text: var mongoose = require('mongoose'),
    mongoosastic = require('../lib/mongoosastic'),
    Schema = mongoose.Schema;
  
  var productSchema = new Schema({master: Array});
  var categorySchema = new Schema({master: Array});
  
  productSchema.plugin(mongoosastic);
  categorySchema.plugin(mongoosastic);
  
  var Product = mongoose.model('Product', productSchema);
  var Category = mongoose.model('Category', categorySchema);
  
  [0, 1, 2, 3, 4, 5, 6].forEach(function(i) {
    var prod = new Product({master: ['prod something ' + i]});
    prod.save();
  });
  
  [0, 1, 2].forEach(function(i) {
    var cat = new Category({master: ['cat something ' + i]});
    cat.save();
  });
  
  mongoose.connect('mongodb://localhost/myapp');
  
  setTimeout(function() {
  
    Product.search({
      match_phrase: {
        master: 'something 3'
      }
    }, {
      hydrate: true,
      highlight: {
        fields: {
          master: {}
        }
      }
    }, function(err, products) {
      console.log('########## PROD ###########');
      console.log(products.hits.hits);
      console.log(products.hits.hits[0].highlight);
  
      process.exit();
    });
  
  }, 3000);
  