diff --git a/ui/src/types.ts b/ui/src/types.ts index 6c1b18926..013efe031 100644 --- a/ui/src/types.ts +++ b/ui/src/types.ts @@ -14,6 +14,7 @@ export type Params = { page?: number; page_size?: number; search?: string; + search_simple_query_string?: string; country?: string | string[]; journal?: string | string[]; publication_year__range?: string; diff --git a/ui/src/utils/utils.tsx b/ui/src/utils/utils.tsx index f87a1c3cd..94d7348e3 100644 --- a/ui/src/utils/utils.tsx +++ b/ui/src/utils/utils.tsx @@ -19,6 +19,9 @@ export const authToken = Token const buildSearchParams = (q: Params): string => { const searchParams = new URLSearchParams(); + // replace 'search' param with 'search_simple_query_string' + if (q["search"]) q['search_simple_query_string'] = q["search"]; + Object.entries(q).forEach(([key, value]) => { if (Array.isArray(value)) { value.forEach(item => searchParams.append(key, item));