Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ML] Fixes Data visualizer/ML field stats and Data Frame Analytics should exclude _tier field #172223

Merged
merged 7 commits into from
Dec 4, 2023
10 changes: 9 additions & 1 deletion x-pack/packages/ml/anomaly_utils/field_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,12 @@ export const _DOC_COUNT = '_doc_count';
/**
* List of system fields we don't want to display.
*/
export const OMIT_FIELDS: string[] = ['_source', '_type', '_index', '_id', '_version', '_score'];
export const OMIT_FIELDS: string[] = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like me, did you try and fail to find a more generic package to put this list of fields in? I don't think it's worth the effort of moving them out at this stage.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ended up reverting this change here d8c234c... The 4kb extra to the bundle was not worth unifying the package import in this case.

'_source',
'_type',
'_index',
'_id',
'_version',
'_score',
'_tier',
];
10 changes: 9 additions & 1 deletion x-pack/plugins/data_visualizer/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,15 @@ export const SUPPORTED_FIELD_TYPES = {
UNKNOWN: 'unknown',
} as const;

export const OMIT_FIELDS: string[] = ['_source', '_type', '_index', '_id', '_version', '_score'];
export const OMIT_FIELDS: string[] = [
'_source',
'_type',
'_index',
'_id',
'_version',
'_score',
'_tier',
];

export const NON_AGGREGATABLE_FIELD_TYPES = new Set<string>([
KBN_FIELD_TYPES.GEO_SHAPE,
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/data_visualizer/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"@kbn/core-notifications-browser",
"@kbn/ebt-tools",
"@kbn/ml-chi2test",
"@kbn/field-utils"
"@kbn/field-utils",
],
"exclude": [
"target/**/*",
Expand Down
Loading