Express.js elasticsearch query not working

I'm trying to build an Express.js application that queries my elasticsearch running on a different server. I created an express scaffold app, and the only thing I've changed is in routes/index.js. I changed it to look like the following:

var express = require('express');
var router = express.Router();

var elasticsearch = require('elasticsearch');
var client = new elasticsearch.Client({
  host: 'http://SERVERDNS.com:9200/'
});

/* GET home page. */
router.get('/', function(req, res) {
  res.render('index', { title: 'Express' });
});

router.get('/search', function(req, res) {
  var wut =       client.search({
          index:"test-papers-es",
          type:"test-papers-es",
          body: {query:
                 {"match": req.query}
                }
      });
  console.log(wut);
  res.send(wut);                                                                                                                                                  
  console.log(wut);
  console.log(req.query);
});
module.exports = router;

The problem is, when I send a query like so:

http://SERVERDNS.com:3000/search?title=gene

I don't get a response (I'm expecting JSON). The console.log for my client.search(var wut) code is this:

{ _bitField: 0,
  _fulfillmentHandler0: undefined,
  _rejectionHandler0: undefined,
  _promise0: undefined,
  _receiver0: undefined,
  _settledValue: undefined,
  _boundTo: undefined,
  abort: [Function: abortRequest] } 

And my req.query looks like this:{ title: 'gene' }

Any idea of what I did wrong?

.search is not synchronous. You can't just invoke it and expect an answer the next line. The API uses promises, as mentioned here: http://www.elasticsearch.org/guide/en/elasticsearch/client/javascript-api/current/quick-start.html#_say_hello_to_elasticsearch

As an example:

client.search({
  q: 'pants'
}).then(function (body) {
  var hits = body.hits.hits;
}, function (error) {
  console.trace(error.message);
});