Im trying to use mongoosastic for searching purposes, but I keep getting 'No Living connections' error and mapping problem
Here's the code
var mongoose = require('mongoose');
var mongoosastic = require('mongoosastic');
var Schema = mongoose.Schema;
var JobSchema = Schema({
  category: { type: Schema.Types.ObjectId, ref: 'Category', es_indexed:true},
  title: { type: String, es_indexed:true },
});
JobSchema.plugin(mongoosastic);
module.exports = mongoose.model('Job', JobSchema);
routes.js
var Job = require('../models/job');
Job.createMapping(function(err, mapping) {
  if (err) {
    console.log('error creating mapping (you can safely ignore this)');
    console.log(err);
  } else {
    console.log('mapping created!');
    console.log(mapping);
  }
});
app.post('/search', function(req, res, next) {
    Job.search({query_string: {query: req.body.q}}, function(err, results) {
        if (err) return next(err);
        res.send(results);
    });
});
I keep getting this error,
Can anyone with experience in using mongoosastic tell,me how do i fix this problem?
