[develop | DONE | FIXED]: searchProjects.service.ts: Added parameter excludeUnidentfied: boolean = true in method "advancedSearchProjects()" to add or not the basic query :&fq=(projectcode<>"unidentified") | claimProjectSearchForm.component.ts: In calls of projectService.advancedSearchProjects, set parameter "excludeUnidentfied" to false, not to exclude unidentified projects (irish funders were missing from the funders list).
This commit is contained in:
parent
c97c54208f
commit
853b072c62
|
@ -72,7 +72,7 @@ export class ClaimProjectsSearchFormComponent {
|
|||
this.openaireResultsStatus = this.errorCodes.LOADING;
|
||||
this.showResults = true;
|
||||
this.sub = this._projectService.advancedSearchProjects("", 1, 0, this.properties,
|
||||
this.refineFieldsQuery, this.refineFields, "&type=projects&sf=funder").subscribe(
|
||||
this.refineFieldsQuery, this.refineFields, "&type=projects&sf=funder", false, false).subscribe(
|
||||
data => {
|
||||
let option = {value : null, label: "No funder selected"};
|
||||
this.funderOptions.push(option);
|
||||
|
@ -110,7 +110,7 @@ export class ClaimProjectsSearchFormComponent {
|
|||
this.prevFilters = this.filters;
|
||||
|
||||
//searchProjects (params: string, refineParams:string, page: number, size: number, refineFields:string[] , properties:EnvProperties ):any {
|
||||
this.sub = this._projectService.advancedSearchProjects(this.createOpenaireQueryParams(), page, size, this.properties, this.createOpenaireRefineQuery(), [], null).subscribe(
|
||||
this.sub = this._projectService.advancedSearchProjects(this.createOpenaireQueryParams(), page, size, this.properties, this.createOpenaireRefineQuery(), [], null, false, false).subscribe(
|
||||
// this.sub = this._projectService.searchProjects(this.createOpenaireQueryParams(),(page==1)? this.refineFieldsQuery:null, page, size, (page==1)?this.refineFields:[], this.properties).subscribe(
|
||||
data => {
|
||||
if (data != null) {
|
||||
|
|
|
@ -50,11 +50,11 @@ export class SearchProjectsService {
|
|||
//.map(res => <any> res.json())
|
||||
.pipe(map(res => [res['meta'].total, this.parseResults(res['results'])]));
|
||||
}
|
||||
advancedSearchProjects (params: string, page: number, size: number, properties:EnvProperties, refineParams:string=null, refineFields:string[] =null, refineQuery:string = null, minRef: boolean = false):any {
|
||||
advancedSearchProjects (params: string, page: number, size: number, properties:EnvProperties, refineParams:string=null, refineFields:string[] =null, refineQuery:string = null, minRef: boolean = false, excludeUnidentfied: boolean = true):any {
|
||||
// &type=projects
|
||||
let url = properties.searchAPIURLLAst+"resources2/?format=json";
|
||||
// var basicQuery = "(oaftype exact project) "
|
||||
var basicQuery = "&fq=(projectcode<>\"unidentified\")";
|
||||
var basicQuery = excludeUnidentfied ? "&fq=(projectcode<>\"unidentified\")" : "";
|
||||
// url += "?query=";
|
||||
if(params!= null && params != '' ) {
|
||||
url +="&query=(" + params + ")";
|
||||
|
|
Loading…
Reference in New Issue