diff --git a/lib/user-interface/react-app/src/pages/rag/semantic-search/semantic-search.tsx b/lib/user-interface/react-app/src/pages/rag/semantic-search/semantic-search.tsx
index 62d85bf86..3ee7303ed 100644
--- a/lib/user-interface/react-app/src/pages/rag/semantic-search/semantic-search.tsx
+++ b/lib/user-interface/react-app/src/pages/rag/semantic-search/semantic-search.tsx
@@ -84,6 +84,7 @@ export default function SemanticSearch() {
data.workspace?.value,
data.query
);
+ console.log(result.data?.performSemanticSearch);
setSearchResult(result.data?.performSemanticSearch);
} catch (error: any) {
console.error(error);
@@ -135,30 +136,36 @@ export default function SemanticSearch() {
label: "Results",
id: "results",
content: (
-
+
),
});
- if (searchResult!.vectorSearchItems!.length > 0) {
+ if (
+ searchResult.vectorSearchItems &&
+ searchResult.vectorSearchItems.length > 0
+ ) {
tabs.push({
label: "Vector Search",
id: "vector-search",
content: (
),
});
}
- if (searchResult.keywordSearchItems!.length > 0) {
+ if (
+ searchResult.keywordSearchItems &&
+ searchResult.keywordSearchItems.length > 0
+ ) {
tabs.push({
label: "Keyword Search",
id: "keyword-search",
content: (
),