diff --git a/public/expressions/helpers.ts b/public/expressions/helpers.ts index c11ace78..9c655a8b 100644 --- a/public/expressions/helpers.ts +++ b/public/expressions/helpers.ts @@ -52,6 +52,9 @@ export const getAnomalies = async ( } ); } else { + if (!resultIndex.endsWith('*')) { + resultIndex += '*'; + } anomalySummaryResponse = await getClient().post( `..${AD_NODE_API.DETECTOR}/results/_search/${resultIndex}/true/${dataSourceId}`, { diff --git a/public/expressions/overlay_anomalies.ts b/public/expressions/overlay_anomalies.ts index ea701c2c..e55efc48 100644 --- a/public/expressions/overlay_anomalies.ts +++ b/public/expressions/overlay_anomalies.ts @@ -134,7 +134,8 @@ export const overlayAnomaliesFunction = detectorId, startTimeInMillis, endTimeInMillis, - resultIndex + resultIndex, + dataSourceId ); const anomalyLayer = convertAnomaliesToPointInTimeEventsVisLayer( anomalies,