From 91c596f37c17f3992eb3f0ce51a9e1c1636f1de5 Mon Sep 17 00:00:00 2001 From: "argiro.kokogiannaki" Date: Fri, 8 Nov 2019 13:44:00 +0000 Subject: [PATCH] [Library |Trunk] add methods gor gettings total number of results linked with publications git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@57551 d315682c-612b-4755-9ff5-7f18f6832af3 --- services/searchResearchResults.service.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/searchResearchResults.service.ts b/services/searchResearchResults.service.ts index f42394cb..b09e18b1 100644 --- a/services/searchResearchResults.service.ts +++ b/services/searchResearchResults.service.ts @@ -370,6 +370,11 @@ export class SearchResearchResultsService { } return this.numOfResults(url, properties); } + numOfSearchResultsLinkedToPub(resultType:string, properties:EnvProperties):any { + let url = properties.searchAPIURLLAst+"resources?query="+encodeURIComponent("( (oaftype exact result) and (resulttypeid exact "+resultType+") and (relresulttype=publication) )")+"&page=0&size=0&format=json"; + return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url) + .pipe(map(res => res['meta']['total'])); + } countTotalResults(resultType:string, properties:EnvProperties, refineParams:string=null):any { let url = properties.searchAPIURLLAst+this.getEntityName(resultType, true)+"/count?format=json"+refineParams;