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);