Use proper query for search in deposit organizations

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@44434 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2016-11-10 13:31:18 +00:00
parent 413439b784
commit b5931f654c
1 changed files with 11 additions and 8 deletions

View File

@ -14,18 +14,21 @@ export class SearchOrganizationsService {
console.info("In searchOrganizationsforDeposit"); console.info("In searchOrganizationsforDeposit");
let link = OpenaireProperties.getSearchAPIURL()+"organizations"; let link = OpenaireProperties.getSearchResourcesAPIURL();
let url = link+"?"; let url = link+"?query=";
if(params!= null && params != '' ) { if(params!= null && params != '' ) {
if(collectedFrom == "OpenDOAR") { url += "((oaftype exact organization and deletedbyinference=false and "+
url += 'contenttype='+this.quote(params)+'&cn=and&compatibility='+this.quote(params)+'&cm=or'; "(reldatasourcecompatibilityid=driver or reldatasourcecompatibilityid=driver-openaire2.0 or reldatasourcecompatibilityid=openaire2.0 or reldatasourcecompatibilityid=openaire3.0 or reldatasourcecompatibilityid=openaire2.0_data or reldatasourcecompatibilityid=hostedBy or relprojectid=*))"+
} else if(collectedFrom == "Registry of Research Data Repository") { " and ((organizationlegalname all "+this.quote(params)+") or (organizationlegalshortname all "+this.quote(params)+")) and (collectedfromdatasourcename exact "+collectedFrom+")) "
url += 'contenttype='+this.quote(params)+'&cn=and&compatibility='+this.quote(params)+'&cm=or'; // if(collectedFrom == "OpenDOAR") {
} //'contenttype='+this.quote(params)+'&cn=and&compatibility='+this.quote(params)+'&cm=or';
// } else if(collectedFrom == "Registry of Research Data Repository") {
// url += 'contenttype='+this.quote(params)+'&cn=and&compatibility='+this.quote(params)+'&cm=or';
// }
} }
//url += "&page="+page+"&size="+size; url += "&page="+page+"&size="+size;
return this.http.get(url) return this.http.get(url)