Merge pull request #8 from epixa/excludes
Use excludes instead of exclude in ES _source query
This commit is contained in:
@@ -287,7 +287,7 @@ export default class Job extends events.EventEmitter {
|
|||||||
const nowTime = moment().toISOString();
|
const nowTime = moment().toISOString();
|
||||||
const query = {
|
const query = {
|
||||||
_source : {
|
_source : {
|
||||||
exclude: [ 'output.content' ]
|
excludes: [ 'output.content' ]
|
||||||
},
|
},
|
||||||
query: {
|
query: {
|
||||||
constant_score: {
|
constant_score: {
|
||||||
|
|||||||
@@ -278,7 +278,7 @@ describe('Worker class', function () {
|
|||||||
const excludedFields = [ 'output.content' ];
|
const excludedFields = [ 'output.content' ];
|
||||||
const { body } = getSearchParams(jobtype);
|
const { body } = getSearchParams(jobtype);
|
||||||
expect(body).to.have.property('_source');
|
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 () {
|
it('should search by job type', function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user