Skip to content

Commit 0033e5d

Browse files
authored
Merge pull request #4469 from Blargian/fix_knowledgebase
Bug fix: duplicate KB articles show in search
2 parents d596fa9 + ffa4203 commit 0033e5d

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

knowledgebase/unable-to-access-cloud-service.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
title: Tips and tricks on optimizing basic data types in ClickHouse
3-
description: "Tips and tricks on optimizing basic data types in ClickHouse"
2+
title: I am unable to access a ClickHouse Cloud service
3+
description: "Troubleshooting access issues with ClickHouse Cloud services, including IP Access List configuration"
44
date: 2024-07-02
5-
tags: ['Errors and Exceptions']
6-
keywords: ['accessing cloud service']
5+
tags: ['Errors and Exceptions', 'Managing Cloud']
6+
keywords: ['accessing cloud service', 'IP Access List']
77
doc_type: 'guide'
88
---
99

src/components/KBArticleSearch/KBArticleSearch.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const KBArticleSearch = ({kb_articles, kb_articles_and_tags, onUpdateResults}) =
5555
}
5656
);
5757
kb_articles_and_tags.forEach((article)=>{
58-
index.add({id: article.id, title: article.title});
58+
index.add({id: article.id, title: article.title, description: article.description});
5959
})
6060
indexRef.current = index;
6161

@@ -111,6 +111,7 @@ const KBArticleSearch = ({kb_articles, kb_articles_and_tags, onUpdateResults}) =
111111
} else if (results && searchTerm.length > 1 && results.length === 0) {
112112
setMatchedArticles([]);
113113
} else {
114+
// Extract all indices from all search field results and deduplicate
114115
const indices = results.flatMap(search_field_results => search_field_results.result);
115116
const unique_indices = [...new Set(indices)];
116117
const filteredArticles = kb_articles_and_tags.filter((article) => {

0 commit comments

Comments
 (0)