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