From 2e6b12db75b69022cd9bf04af20291f4a22f7398 Mon Sep 17 00:00:00 2001 From: deo002 Date: Mon, 9 Oct 2023 15:07:51 +0530 Subject: [PATCH] feat(entire_document): Add functionality for entire document search --- src/app/[locale]/search/components/KeywordSearch.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/[locale]/search/components/KeywordSearch.tsx b/src/app/[locale]/search/components/KeywordSearch.tsx index 6181df621..93be93340 100644 --- a/src/app/[locale]/search/components/KeywordSearch.tsx +++ b/src/app/[locale]/search/components/KeywordSearch.tsx @@ -159,8 +159,12 @@ export default function KeywordSearch({ let paramString = '' paramString += `?searchText=${encodeURIComponent(searchText)}` for (const k in searchOptions) { - if (k === 'entireDocument' || searchOptions[k as keyof SEARCH_STATE] === false) continue - paramString += `&typeMasks=${encodeURIComponent(k)}` + if (searchOptions[k as keyof SEARCH_STATE] === false) continue + if (k === 'entireDocument') { + paramString += '&typeMasks=document' + } else { + paramString += `&typeMasks=${encodeURIComponent(k)}` + } } queryUrl += paramString