entitySearch.service.ts: (Autocomplete component) Query for projects and organizations in advanced search changed to search specific fields and not just keyword.

Query fields for projects: grantid (projectcode_nt), funder name (fundershortname), acronym (projectacronym), title (projecttitle)
	Query fields for organizations: organizationlegalname, organizationlegalshortname.


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@54746 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2019-02-11 10:52:24 +00:00
parent 8cf5067803
commit 21d8198774
1 changed files with 9 additions and 1 deletions

View File

@ -129,7 +129,15 @@ private fetch (link,id,oafEntityType,type, properties:EnvProperties ){
this.ready = false; this.ready = false;
let url = link+"?"; let url = link+"?";
if(keyword!= null && keyword != '' ) { if(keyword!= null && keyword != '' ) {
url += "q="+ keyword; if(type=="project") {
//name, title, acronym, grantid
url += "fq="+'(projectcode_nt="'+keyword+'" ) or (fundershortname='+'"'+keyword+ '"'+') or (projectacronym="'+keyword+'" ) or (projecttitle="'+keyword+'")';
} else if(type=="organization") {
//name fields
url += "fq="+'(organizationlegalname="'+keyword+'" ) or (organizationlegalshortname='+'"'+keyword+ '")';
} else {
url += "q="+ keyword;
}
} }
url += "&page=0&size="+10+"&format=json"; url += "&page=0&size="+10+"&format=json";