From 496ff5d07fa65970a5c5cc2ccd4043f43003aac3 Mon Sep 17 00:00:00 2001 From: Sander Philipse Date: Thu, 21 Nov 2024 17:26:43 +0100 Subject: [PATCH] [Search] Fix documents count in Search indices page --- .../components/result/result_field.tsx | 3 +++ .../public/components/quick_stats/quick_stats.tsx | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/kbn-search-index-documents/components/result/result_field.tsx b/packages/kbn-search-index-documents/components/result/result_field.tsx index acd495f71cd44..8f887f52406de 100644 --- a/packages/kbn-search-index-documents/components/result/result_field.tsx +++ b/packages/kbn-search-index-documents/components/result/result_field.tsx @@ -85,6 +85,9 @@ export const ResultField: React.FC = ({ setIsPopoverOpen(!isPopoverOpen)} iconType={iconType || (fieldType ? iconMap[fieldType] : defaultToken)} /> diff --git a/x-pack/plugins/search_indices/public/components/quick_stats/quick_stats.tsx b/x-pack/plugins/search_indices/public/components/quick_stats/quick_stats.tsx index e051fee17d2e2..cc5688fe96de2 100644 --- a/x-pack/plugins/search_indices/public/components/quick_stats/quick_stats.tsx +++ b/x-pack/plugins/search_indices/public/components/quick_stats/quick_stats.tsx @@ -68,7 +68,7 @@ export const QuickStats: React.FC = ({ index, mappings, indexDo const mappingStats = useMemo(() => countVectorBasedTypesFromMappings(mappings), [mappings]); const vectorFieldCount = mappingStats.sparse_vector + mappingStats.dense_vector + mappingStats.semantic_text; - const docCount = indexDocuments?.results._meta.page.total ?? 0; + const docCount = index.documents ?? 0; return (