From 7af0c820805d9c165113f3f137e7e2a4f9bdbbe2 Mon Sep 17 00:00:00 2001 From: Court Ewing Date: Wed, 14 Sep 2016 12:24:11 -0400 Subject: [PATCH] Use excludes instead of exclude in ES _source query As of ES 5.0, you must use the plural name. --- src/worker.js | 2 +- test/src/worker.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/worker.js b/src/worker.js index 57f67b8..da5440e 100644 --- a/src/worker.js +++ b/src/worker.js @@ -287,7 +287,7 @@ export default class Job extends events.EventEmitter { const nowTime = moment().toISOString(); const query = { _source : { - exclude: [ 'output.content' ] + excludes: [ 'output.content' ] }, query: { constant_score: { diff --git a/test/src/worker.js b/test/src/worker.js index b2680b0..0c4df54 100644 --- a/test/src/worker.js +++ b/test/src/worker.js @@ -278,7 +278,7 @@ describe('Worker class', function () { const excludedFields = [ 'output.content' ]; const { body } = getSearchParams(jobtype); expect(body).to.have.property('_source'); - expect(body._source).to.eql({ exclude: excludedFields }); + expect(body._source).to.eql({ excludes: excludedFields }); }); it('should search by job type', function () {