From d93c2f1e4388e68be939c378513db6bc080a32e8 Mon Sep 17 00:00:00 2001 From: darth-coder00 <86726556+darth-coder00@users.noreply.github.com> Date: Tue, 12 Oct 2021 22:21:05 +0530 Subject: [PATCH] Fixed search with advanced search syntax (#747) --- .../src/main/resources/ui/src/utils/SearchUtils.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/catalog-rest-service/src/main/resources/ui/src/utils/SearchUtils.ts b/catalog-rest-service/src/main/resources/ui/src/utils/SearchUtils.ts index 991ac12dda7..62e5b93deb2 100644 --- a/catalog-rest-service/src/main/resources/ui/src/utils/SearchUtils.ts +++ b/catalog-rest-service/src/main/resources/ui/src/utils/SearchUtils.ts @@ -8,7 +8,11 @@ export const getSearchAPIQuery = ( searchIndex: string ): string => { const start = (from - 1) * size; - const query = queryString ? `*${queryString}*` : '*'; + const query = queryString + ? queryString.includes(':') + ? queryString + : `*${queryString}*` + : '*'; return `q=${query}${ filters ? ` AND ${filters}` : ''