diff --git a/x-pack/plugins/transform/public/app/common/request.ts b/x-pack/plugins/transform/public/app/common/request.ts index 79fb3acb9fcaf..7e965dbe802c0 100644 --- a/x-pack/plugins/transform/public/app/common/request.ts +++ b/x-pack/plugins/transform/public/app/common/request.ts @@ -81,7 +81,7 @@ export function getPreviewRequestBody( }, }; - if (!isDefaultQuery(query)) { + if (!isDefaultQuery(query) && !isMatchAllQuery(query)) { request.source.query = query; } diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx index a1e00fcd3b8ed..f31514e67003b 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx @@ -17,7 +17,7 @@ import { EuiText, } from '@elastic/eui'; -import { getPivotQuery, isDefaultQuery } from '../../../../common'; +import { getPivotQuery, isDefaultQuery, isMatchAllQuery } from '../../../../common'; import { PivotPreview } from '../../../../components/pivot_preview'; import { SearchItems } from '../../../../hooks/use_search_items'; @@ -60,24 +60,29 @@ export const StepDefineSummary: FC = ({ {searchString} )} - {typeof searchString === 'undefined' && !isDefaultQuery(pivotQuery) && ( - - - {JSON.stringify(pivotQuery, null, 2)} - - - )} + + {JSON.stringify(pivotQuery, null, 2)} + + + )} )}