diff --git a/src/plugins/visualizations/public/legacy/build_pipeline.ts b/src/plugins/visualizations/public/legacy/build_pipeline.ts index d52e2fcc13bff..a9cf1c0f2543b 100644 --- a/src/plugins/visualizations/public/legacy/build_pipeline.ts +++ b/src/plugins/visualizations/public/legacy/build_pipeline.ts @@ -490,8 +490,8 @@ export const buildPipeline = async ( } ) => { const { indexPattern, searchSource } = vis.data; - const query = searchSource!.getField('query'); - const filters = searchSource!.getField('filter'); + const query = vis.type.name !== 'metrics' && searchSource!.getField('query'); + const filters = vis.type.name !== 'metrics' && searchSource!.getField('filter'); const { uiState, title } = vis; // context