Skip to content

Commit

Permalink
[courier] remove use of filtered_query
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger committed Jan 5, 2016
1 parent 1bece49 commit dc4dec2
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions src/ui/public/courier/data_source/_abstract.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
};
}
Expand Down

0 comments on commit dc4dec2

Please sign in to comment.