Some fixes from backport (#89746)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
ymao1 2021-02-01 10:17:59 -05:00 committed by GitHub
parent 688b918888
commit 57453f1709
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 3 deletions

View file

@ -87,7 +87,7 @@ export const buildSortedEventsQuery = ({
...searchQuery.body, ...searchQuery.body,
search_after: [searchAfterSortId], search_after: [searchAfterSortId],
}, },
}; } as ESSearchRequest;
} }
return searchQuery; return searchQuery as ESSearchRequest;
}; };

View file

@ -175,7 +175,17 @@ export function getAlertType(
{ {
bool: { bool: {
must_not: [ must_not: [
{ bool: { filter: [{ range: { [params.timeField]: { lte: timestamp } } }] } }, {
bool: {
filter: [
{
range: {
[params.timeField]: { lte: new Date(timestamp).toISOString() },
},
},
],
},
},
], ],
}, },
}, },