Skip to content

Commit

Permalink
[ML] Allow splitting by field of ip type for Change point detection (
Browse files Browse the repository at this point in the history
…elastic#151022)

## Summary

Follow-up for elastic#150308

Resolves elastic#145703

Allows splitting by field of `ip` type for Change point detection
  • Loading branch information
darnautov authored and justinkambic committed Feb 23, 2023
1 parent a246d7e commit 312664c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import type { Filter, Query } from '@kbn/es-query';
import { usePageUrlState } from '@kbn/ml-url-state';
import { useTimefilter, useTimeRangeUpdates } from '@kbn/ml-date-picker';
import moment from 'moment';
import { ES_FIELD_TYPES } from '@kbn/field-types';
import { DEFAULT_AGG_FUNCTION } from './constants';
import { useSplitFieldCardinality } from './use_split_field_cardinality';
import {
Expand Down Expand Up @@ -163,7 +164,9 @@ export const ChangePointDetectionContextProvider: FC = ({ children }) => {
({ aggregatable, esTypes, displayName }) =>
aggregatable &&
esTypes &&
esTypes.includes('keyword') &&
esTypes.some((el) =>
[ES_FIELD_TYPES.KEYWORD, ES_FIELD_TYPES.IP].includes(el as ES_FIELD_TYPES)
) &&
!['_id', '_index'].includes(displayName)
);
}, [dataView]);
Expand Down

0 comments on commit 312664c

Please sign in to comment.