diff --git a/plugins/query-insights/src/main/java/org/opensearch/plugin/insights/core/service/QueryInsightsService.java b/plugins/query-insights/src/main/java/org/opensearch/plugin/insights/core/service/QueryInsightsService.java index f0f504447cf82..8dde7ec9588ee 100644 --- a/plugins/query-insights/src/main/java/org/opensearch/plugin/insights/core/service/QueryInsightsService.java +++ b/plugins/query-insights/src/main/java/org/opensearch/plugin/insights/core/service/QueryInsightsService.java @@ -209,7 +209,7 @@ public boolean isCollectionEnabled(final MetricType metricType) { } /** - * Check if query insights service is enabled + * Check if query insights service is enabled including TopN and categorization. * * @return if query insights service is enabled */ @@ -219,7 +219,7 @@ public boolean isEnabled() { return true; } } - return false; + return searchQueryMetricsEnabled; } /**