Skip to content

Commit

Permalink
[ML] AIOps: fixing time range filter in change point chart (elastic#2…
Browse files Browse the repository at this point in the history
…00183)

The [range
query](https://www.elastic.co/guide/en/elasticsearch/reference/8.16/query-dsl-range-query.html)
takes `gte` and `lte` rather than `from` and `to`.
These are now being flagged up in the kibana readiness
[report](elastic/kibana-team#1173) as being
deprecate, although they never seem to be have been supported.

It is unclear if this query was working as expected, but there appears
to be no change in the chart when switching to the correct properties.

---------

Co-authored-by: kibanamachine <[email protected]>
  • Loading branch information
2 people authored and CAWilson94 committed Nov 18, 2024
1 parent 76071d3 commit 7838bbe
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ export const ChartGridEmbeddableWrapper: FC<ChangePointDetectionProps> = ({
mergedQuery.bool.filter.push({
range: {
[dataView.timeFieldName!]: {
from: searchBounds.min?.valueOf(),
to: searchBounds.max?.valueOf(),
gte: searchBounds.min?.valueOf(),
lte: searchBounds.max?.valueOf(),
format: 'epoch_millis',
},
},
Expand Down

0 comments on commit 7838bbe

Please sign in to comment.