|
|
|
@ -75,7 +75,8 @@ 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.searchProjects(this.createOpenaireQueryParams(),(page==1)? this.refineFieldsQuery:null, page, size, (page==1)?this.refineFields:[], this.properties).subscribe(
|
|
|
|
|
this.sub = this._projectService.advancedSearchProjects(this.createOpenaireQueryParams(), page, size, this.properties, (page == 1) ? this.refineFieldsQuery : null, (page == 1) ? this.refineFields : [], this.createOpenaireRefineQuery()).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) {
|
|
|
|
|
this.openaireResultsPage = page;
|
|
|
|
@ -205,9 +206,13 @@ export class ClaimProjectsSearchFormComponent {
|
|
|
|
|
createOpenaireQueryParams(): string {
|
|
|
|
|
let query = "";
|
|
|
|
|
if (this.keyword.length > 0) {
|
|
|
|
|
query += "q=" + StringUtils.quote(StringUtils.URIEncode(this.keyword));
|
|
|
|
|
// query += "q=" + StringUtils.quote(StringUtils.URIEncode(this.keyword));
|
|
|
|
|
query += StringUtils.quote(StringUtils.URIEncode(this.keyword));
|
|
|
|
|
}
|
|
|
|
|
return query;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
createOpenaireRefineQuery(): string {
|
|
|
|
|
/*if(this.startYear.length > 0 ){
|
|
|
|
|
query+='&fq=projectstartyear exact \"'+this.startYear+'\"'
|
|
|
|
|
}
|
|
|
|
@ -236,9 +241,9 @@ export class ClaimProjectsSearchFormComponent {
|
|
|
|
|
//selectedFromValue, selectedToValue, equalityOp, equalityOpFrom, equalityOpTo, filterOp ){
|
|
|
|
|
allFqs += NewSearchPageComponent.createRangeFilterQuery(this.rangeFields[i], filter.selectedFromValue, filter.selectedToValue, " within ", ">=", "<=", "and")
|
|
|
|
|
}
|
|
|
|
|
return query+allFqs;
|
|
|
|
|
|
|
|
|
|
return allFqs + "&type=projects";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public yearChanged() {
|
|
|
|
|
this.search(this.page, this.size);
|
|
|
|
|
|
|
|
|
@ -273,7 +278,7 @@ export class ClaimProjectsSearchFormComponent {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
filter.countAllValues = filter.values.length;
|
|
|
|
|
}
|
|
|
|
|
if(filters.length == 0 ){
|
|
|
|
|
for(let j=0; j< prevFilters.length ; j++) {
|
|
|
|
@ -285,6 +290,7 @@ export class ClaimProjectsSearchFormComponent {
|
|
|
|
|
filter.values.push(filterValue);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
filter.countAllValues = filter.values.length;
|
|
|
|
|
filters.push(filter)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|