Skip to content

Commit f6749e3

Browse files
committed
[ML] Transforms: Remove index field limitation for custom query. (#81467)
The query bar originally developed for the transforms wizard didn't work with indices with more than 1024 fields. In that case we disabled the query bar and showed an info-callout. Since we moved on to make use of the KQL query bar, this limitation does no longer exist so this PR removes the limitation.
1 parent c87aa13 commit f6749e3

File tree

3 files changed

+1
-20
lines changed

3 files changed

+1
-20
lines changed

x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,6 @@ export const StepDefineForm: FC<StepDefineFormProps> = React.memo((props) => {
102102
toastNotifications,
103103
};
104104

105-
// TODO This should use the actual value of `indices.query.bool.max_clause_count`
106-
const maxIndexFields = 1024;
107-
const numIndexFields = indexPattern.fields.length;
108-
const disabledQuery = numIndexFields > maxIndexFields;
109-
110105
const copyToClipboardSource = getIndexDevConsoleStatement(pivotQuery, indexPattern.title);
111106
const copyToClipboardSourceDescription = i18n.translate(
112107
'xpack.transform.indexPreview.copyClipboardTooltip',
@@ -181,18 +176,6 @@ export const StepDefineForm: FC<StepDefineFormProps> = React.memo((props) => {
181176
label={i18n.translate('xpack.transform.stepDefineForm.indexPatternLabel', {
182177
defaultMessage: 'Index pattern',
183178
})}
184-
helpText={
185-
disabledQuery
186-
? i18n.translate('xpack.transform.stepDefineForm.indexPatternHelpText', {
187-
defaultMessage:
188-
'An optional query for this index pattern is not supported. The number of supported index fields is {maxIndexFields} whereas this index has {numIndexFields} fields.',
189-
values: {
190-
maxIndexFields,
191-
numIndexFields,
192-
},
193-
})
194-
: ''
195-
}
196179
>
197180
<span>{indexPattern.title}</span>
198181
</EuiFormRow>
@@ -214,7 +197,7 @@ export const StepDefineForm: FC<StepDefineFormProps> = React.memo((props) => {
214197
{/* Flex Column #1: Search Bar / Advanced Search Editor */}
215198
{searchItems.savedSearch === undefined && (
216199
<>
217-
{!disabledQuery && !isAdvancedSourceEditorEnabled && (
200+
{!isAdvancedSourceEditorEnabled && (
218201
<SourceSearchBar
219202
indexPattern={indexPattern}
220203
searchBar={stepDefineForm.searchBar}

x-pack/plugins/translations/translations/ja-JP.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19774,7 +19774,6 @@
1977419774
"xpack.transform.stepDefineForm.groupByExistsErrorMessage": "「{aggName}」という名前のグループ分け構成は既に存在します。",
1977519775
"xpack.transform.stepDefineForm.groupByLabel": "グループ分けの条件",
1977619776
"xpack.transform.stepDefineForm.groupByPlaceholder": "グループ分けの条件フィールドを追加…",
19777-
"xpack.transform.stepDefineForm.indexPatternHelpText": "このインデックスパターンのオプションのクエリはサポートされていません。サポートされているインデックスフィールドの数は {maxIndexFields} で、このインデックスには {numIndexFields} 個のフィールドがあります。",
1977819777
"xpack.transform.stepDefineForm.indexPatternLabel": "インデックスパターン",
1977919778
"xpack.transform.stepDefineForm.invalidKuerySyntaxErrorMessageQueryBar": "無効なクエリ:{errorMessage}",
1978019779
"xpack.transform.stepDefineForm.maxSubAggsLevelsLimitMessage": "フォームで追加できる下位集約の最大レベル数に達しました。別のレベルを追加する場合は、JSON構成を編集してください。",

x-pack/plugins/translations/translations/zh-CN.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19793,7 +19793,6 @@
1979319793
"xpack.transform.stepDefineForm.groupByExistsErrorMessage": "名称为“{aggName}”的分组依据配置已存在。",
1979419794
"xpack.transform.stepDefineForm.groupByLabel": "分组依据",
1979519795
"xpack.transform.stepDefineForm.groupByPlaceholder": "添加分组依据字段……",
19796-
"xpack.transform.stepDefineForm.indexPatternHelpText": "不支持此索引模式的可选查询。受支持索引字段数目为 {maxIndexFields},而此索引有 {numIndexFields} 个字段。",
1979719796
"xpack.transform.stepDefineForm.indexPatternLabel": "索引模式",
1979819797
"xpack.transform.stepDefineForm.invalidKuerySyntaxErrorMessageQueryBar": "查询无效:{errorMessage}",
1979919798
"xpack.transform.stepDefineForm.maxSubAggsLevelsLimitMessage": "您已达到可在表单中添加的最大子聚合级别数。如果想再添加一个级别,请编辑 JSON 配置。",

0 commit comments

Comments
 (0)