From 16fd671a5cfe974d5ecfe9ce59199e294cfe2d85 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Fri, 9 Sep 2022 12:13:01 +0300 Subject: [PATCH] Fix parenthesis bug in search queries --- searchPages/searchUtils/newSearchPage.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/searchPages/searchUtils/newSearchPage.component.ts b/searchPages/searchUtils/newSearchPage.component.ts index 2605c255..69163faa 100644 --- a/searchPages/searchUtils/newSearchPage.component.ts +++ b/searchPages/searchUtils/newSearchPage.component.ts @@ -6,7 +6,7 @@ import { OnChanges, OnDestroy, OnInit, - Output, SimpleChanges, + SimpleChanges, ViewChild } from '@angular/core'; import {Location} from '@angular/common'; @@ -985,7 +985,7 @@ export class NewSearchPageComponent implements OnInit, OnDestroy, OnChanges { } } if (doisParams.length > 0) { - params += this.createQuotedKeywordQuery(value, id, operatorId, countParams, true, true, includes) + (includes?(" or " + doisParams + ")"):")"); + params += this.createQuotedKeywordQuery(value, id, operatorId, countParams, true, true, 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,