From d45c573a56078cd980e6afa644610ff177a56cf6 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Wed, 31 Aug 2022 12:27:20 +0300 Subject: [PATCH] Search all: Add margin bottom from tabs. Search: Fix queries for projects, etc with miss parenthesis and fix queries with not includes in all content while DOI is available). --- searchPages/find/searchAll.component.html | 2 +- searchPages/searchUtils/newSearchPage.component.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/searchPages/find/searchAll.component.html b/searchPages/find/searchAll.component.html index 9cae3a4e..0f378b3b 100644 --- a/searchPages/find/searchAll.component.html +++ b/searchPages/find/searchAll.component.html @@ -27,7 +27,7 @@ -
+
diff --git a/searchPages/searchUtils/newSearchPage.component.ts b/searchPages/searchUtils/newSearchPage.component.ts index cefc6e78..00d181e9 100644 --- a/searchPages/searchUtils/newSearchPage.component.ts +++ b/searchPages/searchUtils/newSearchPage.component.ts @@ -987,11 +987,11 @@ export class NewSearchPageComponent implements OnInit, OnDestroy, OnChanges { } } if (doisParams.length > 0) { - params += this.createQuotedKeywordQuery(value, id, operatorId, countParams, true, true, includes) + " or " + doisParams + ")"; + params += this.createQuotedKeywordQuery(value, id, operatorId, countParams, true, true, includes) + (includes?(" or " + doisParams + ")"):")"); } else { //if it is PIDs but no doisquery produced, forced to use quotes as the query will fail due to special characters params += this.createQuotedKeywordQuery(value, id, operatorId, countParams, true, - (DOIs.length > 0 && doisParams.length == 0), includes); + (DOIs.length > 0 && doisParams.length == 0), includes) + ")"; } return params; @@ -1014,7 +1014,7 @@ export class NewSearchPageComponent implements OnInit, OnDestroy, OnChanges { if (forceQuotted) { /** Remove double quotes **/ fieldValue = fieldValue.replace(/["]+/g, ''); - return (countParams == 0 ? "(" : " " + fieldOperator + " (") + this.getQuotedQueryPart(fieldId, '"' + fieldValue + '"', isSearchAll); + return params + this.getQuotedQueryPart(fieldId, '"' + fieldValue + '"', isSearchAll); } if (quotedParts && quotedParts.length == 1 && quotedParts[0] == fieldValue) { params += this.getQuotedQueryPart(fieldId, fieldValue, isSearchAll);