[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
This commit is contained in:
argiro.kokogiannaki 2019-07-01 10:14:31 +00:00
parent 931527e91d
commit 7624ff6335
1 changed files with 5 additions and 1 deletions

View File

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