From b59136295c25d4a3ffe4871c013d8469da201ffb Mon Sep 17 00:00:00 2001 From: James Gowdy Date: Fri, 15 Nov 2024 13:59:00 +0000 Subject: [PATCH] [ML] AIOps: fixing time range filter in change point chart (#200183) 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](https://github.com/elastic/kibana-team/issues/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 <42973632+kibanamachine@users.noreply.github.com> --- .../change_point_chart/embeddable_chart_component_wrapper.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/aiops/public/embeddables/change_point_chart/embeddable_chart_component_wrapper.tsx b/x-pack/plugins/aiops/public/embeddables/change_point_chart/embeddable_chart_component_wrapper.tsx index 15159d7adb60c..c96f8376a2ad9 100644 --- a/x-pack/plugins/aiops/public/embeddables/change_point_chart/embeddable_chart_component_wrapper.tsx +++ b/x-pack/plugins/aiops/public/embeddables/change_point_chart/embeddable_chart_component_wrapper.tsx @@ -72,8 +72,8 @@ export const ChartGridEmbeddableWrapper: FC = ({ 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', }, },