Skip to content

Commit

Permalink
[ML] move range query inside of a filter
Browse files Browse the repository at this point in the history
  • Loading branch information
darnautov committed Aug 4, 2021
1 parent 9606a2f commit 637cc90
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions x-pack/plugins/ml/server/models/annotation_service/annotation.ts
Expand Up @@ -360,20 +360,8 @@ export function annotationProvider({ asInternalUser }: IScopedClusterClient) {
body: {
query: {
bool: {
...(earliestMs
? {
must: [
{
range: {
end_timestamp: {
gte: earliestMs,
},
},
},
],
}
: {}),
filter: [
...(earliestMs ? [{ range: { end_timestamp: { gte: earliestMs } } }] : []),
{
term: { event: { value: 'delayed_data' } },
},
Expand Down

0 comments on commit 637cc90

Please sign in to comment.