Skip to content

Commit

Permalink
feat(entire_document): Add functionality for entire document search
Browse files Browse the repository at this point in the history
  • Loading branch information
deo002 committed Oct 9, 2023
1 parent c55cc13 commit 2e6b12d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/app/[locale]/search/components/KeywordSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 2e6b12d

Please sign in to comment.