diff --git a/src/ui/public/courier/data_source/_abstract.js b/src/ui/public/courier/data_source/_abstract.js index e51262a8f31a9..c913e5171110b 100644 --- a/src/ui/public/courier/data_source/_abstract.js +++ b/src/ui/public/courier/data_source/_abstract.js @@ -321,14 +321,20 @@ define(function (require) { }); flatState.body.query = { - filtered: { - query: flatState.body.query, - filter: { - bool: { - must: _(flatState.filters).filter(filterNegate(false)).map(cleanFilter).value(), - must_not: _(flatState.filters).filter(filterNegate(true)).map(cleanFilter).value() - } - } + bool: { + must: + [flatState.body.query] + .concat( + _(flatState.filters) + .filter(filterNegate(false)) + .map(cleanFilter) + .value() + ), + + must_not: + _(flatState.filters) + .filter(filterNegate(true)) + .map(cleanFilter).value() } }; }