Skip to content

Commit

Permalink
[ML] Fixing new population job wizard with saved search (elastic#75731)…
Browse files Browse the repository at this point in the history
  • Loading branch information
jgowdyelastic authored Aug 24, 2020
1 parent 1d6a867 commit 10c4995
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,14 @@ function getPopulationSearchJsonFromConfig(
},
};

if (query.bool === undefined) {
query.bool = {
must: [],
};
} else if (query.bool.must === undefined) {
query.bool.must = [];
}

query.bool.must.push({
range: {
[timeField]: {
Expand Down

0 comments on commit 10c4995

Please sign in to comment.