From 7624ff6335ce73f4705a4fcc15d09b9e35d2fd75 Mon Sep 17 00:00:00 2001 From: "argiro.kokogiannaki" Date: Mon, 1 Jul 2019 10:14:31 +0000 Subject: [PATCH] [Library|Trunk] search orcid service: enhance author query git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@56289 d315682c-612b-4755-9ff5-7f18f6832af3 --- claims/claim-utils/service/searchOrcid.service.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/claims/claim-utils/service/searchOrcid.service.ts b/claims/claim-utils/service/searchOrcid.service.ts index 05cdb966..b4bc6c0a 100644 --- a/claims/claim-utils/service/searchOrcid.service.ts +++ b/claims/claim-utils/service/searchOrcid.service.ts @@ -10,6 +10,7 @@ import{EnvProperties} from '../../../utils/properties/env-properties'; import { ClaimResult} from '../claimEntities.class'; import {map} from "rxjs/operators"; +import {StringUtils} from "../../../utils/string-utils.class"; @Injectable() export class SearchOrcidService { @@ -41,7 +42,10 @@ export class SearchOrcidService { //headers.append('Accept', 'application/orcid+json'); let headers = new HttpHeaders({'Accept': 'application/orcid+json'}); - let url = properties.searchOrcidURL+'search?defType=edismax&q='+term+'&qf=given-name^1.0+family-name^2.0+other-names^1.0+credit-name^1.0&start=0&rows=10'; + // let url = properties.searchOrcidURL+'search?defType=edismax&q='+term+'&qf=given-name^1.0+family-name^2.0+other-names^1.0+credit-name^1.0&start=0&rows=10'; + let url = properties.searchOrcidURL+'search?q='+StringUtils.URIEncode('{!edismax qf="given-and-family-names^50.0 family-name^10.0 given-names^5.0 credit-name^10.0 other-names^5.0 text^1.0" pf="given-and-family-names^50.0" mm=1}')+term+'&start=0&rows=10'; + + //q={!edismax qf="given-and-family-names^50.0 family-name^10.0 given-names^5.0 credit-name^10.0 other-names^5.0 text^1.0" pf="given-and-family-names^50.0" mm=1}alessia bardi&start=0&rows=10 let key = url; return this.http.get(url, { headers: headers })