[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.openaireResultsStatus = this.errorCodes.LOADING;
|
||||||
this.showResults = true;
|
this.showResults = true;
|
||||||
this.sub = this._projectService.advancedSearchProjects("", 1, 0, this.properties,
|
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 => {
|
data => {
|
||||||
let option = {value : null, label: "No funder selected"};
|
let option = {value : null, label: "No funder selected"};
|
||||||
this.funderOptions.push(option);
|
this.funderOptions.push(option);
|
||||||
|
@ -110,7 +110,7 @@ export class ClaimProjectsSearchFormComponent {
|
||||||
this.prevFilters = this.filters;
|
this.prevFilters = this.filters;
|
||||||
|
|
||||||
//searchProjects (params: string, refineParams:string, page: number, size: number, refineFields:string[] , properties:EnvProperties ):any {
|
//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(
|
// this.sub = this._projectService.searchProjects(this.createOpenaireQueryParams(),(page==1)? this.refineFieldsQuery:null, page, size, (page==1)?this.refineFields:[], this.properties).subscribe(
|
||||||
data => {
|
data => {
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
|
|
|
@ -50,11 +50,11 @@ export class SearchProjectsService {
|
||||||
//.map(res => <any> res.json())
|
//.map(res => <any> res.json())
|
||||||
.pipe(map(res => [res['meta'].total, this.parseResults(res['results'])]));
|
.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
|
// &type=projects
|
||||||
let url = properties.searchAPIURLLAst+"resources2/?format=json";
|
let url = properties.searchAPIURLLAst+"resources2/?format=json";
|
||||||
// var basicQuery = "(oaftype exact project) "
|
// var basicQuery = "(oaftype exact project) "
|
||||||
var basicQuery = "&fq=(projectcode<>\"unidentified\")";
|
var basicQuery = excludeUnidentfied ? "&fq=(projectcode<>\"unidentified\")" : "";
|
||||||
// url += "?query=";
|
// url += "?query=";
|
||||||
if(params!= null && params != '' ) {
|
if(params!= null && params != '' ) {
|
||||||
url +="&query=(" + params + ")";
|
url +="&query=(" + params + ")";
|
||||||
|
|
Loading…
Reference in New Issue