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] Transforms: Remove index field limitation for custom query. #81467

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,6 @@ export const StepDefineForm: FC<StepDefineFormProps> = React.memo((props) => {
toastNotifications,
};

// TODO This should use the actual value of `indices.query.bool.max_clause_count`
const maxIndexFields = 1024;
const numIndexFields = indexPattern.fields.length;
const disabledQuery = numIndexFields > maxIndexFields;

const copyToClipboardSource = getIndexDevConsoleStatement(pivotQuery, indexPattern.title);
const copyToClipboardSourceDescription = i18n.translate(
'xpack.transform.indexPreview.copyClipboardTooltip',
Expand Down Expand Up @@ -181,18 +176,6 @@ export const StepDefineForm: FC<StepDefineFormProps> = React.memo((props) => {
label={i18n.translate('xpack.transform.stepDefineForm.indexPatternLabel', {
defaultMessage: 'Index pattern',
})}
helpText={
disabledQuery
? i18n.translate('xpack.transform.stepDefineForm.indexPatternHelpText', {
defaultMessage:
'An optional query for this index pattern is not supported. The number of supported index fields is {maxIndexFields} whereas this index has {numIndexFields} fields.',
values: {
maxIndexFields,
numIndexFields,
},
})
: ''
}
>
<span>{indexPattern.title}</span>
</EuiFormRow>
Expand All @@ -214,7 +197,7 @@ export const StepDefineForm: FC<StepDefineFormProps> = React.memo((props) => {
{/* Flex Column #1: Search Bar / Advanced Search Editor */}
{searchItems.savedSearch === undefined && (
<>
{!disabledQuery && !isAdvancedSourceEditorEnabled && (
{!isAdvancedSourceEditorEnabled && (
<SourceSearchBar
indexPattern={indexPattern}
searchBar={stepDefineForm.searchBar}
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -19764,7 +19764,6 @@
"xpack.transform.stepDefineForm.groupByExistsErrorMessage": "「{aggName}」という名前のグループ分け構成は既に存在します。",
"xpack.transform.stepDefineForm.groupByLabel": "グループ分けの条件",
"xpack.transform.stepDefineForm.groupByPlaceholder": "グループ分けの条件フィールドを追加…",
"xpack.transform.stepDefineForm.indexPatternHelpText": "このインデックスパターンのオプションのクエリはサポートされていません。サポートされているインデックスフィールドの数は {maxIndexFields} で、このインデックスには {numIndexFields} 個のフィールドがあります。",
"xpack.transform.stepDefineForm.indexPatternLabel": "インデックスパターン",
"xpack.transform.stepDefineForm.invalidKuerySyntaxErrorMessageQueryBar": "無効なクエリ:{errorMessage}",
"xpack.transform.stepDefineForm.maxSubAggsLevelsLimitMessage": "フォームで追加できる下位集約の最大レベル数に達しました。別のレベルを追加する場合は、JSON構成を編集してください。",
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -19783,7 +19783,6 @@
"xpack.transform.stepDefineForm.groupByExistsErrorMessage": "名称为“{aggName}”的分组依据配置已存在。",
"xpack.transform.stepDefineForm.groupByLabel": "分组依据",
"xpack.transform.stepDefineForm.groupByPlaceholder": "添加分组依据字段……",
"xpack.transform.stepDefineForm.indexPatternHelpText": "不支持此索引模式的可选查询。受支持索引字段数目为 {maxIndexFields},而此索引有 {numIndexFields} 个字段。",
"xpack.transform.stepDefineForm.indexPatternLabel": "索引模式",
"xpack.transform.stepDefineForm.invalidKuerySyntaxErrorMessageQueryBar": "查询无效:{errorMessage}",
"xpack.transform.stepDefineForm.maxSubAggsLevelsLimitMessage": "您已达到可在表单中添加的最大子聚合级别数。如果想再添加一个级别,请编辑 JSON 配置。",
Expand Down