Use excludes instead of exclude in ES _source query
As of ES 5.0, you must use the plural name.
This commit is contained in:
@@ -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: {
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user