Compare commits
3 Commits
Author | SHA1 | Date |
---|---|---|
Konstantina Galouni | e90a1efee3 | |
Konstantina Galouni | 1fe88aa7b7 | |
Konstantina Galouni | 85cd71fe06 |
|
@ -11,6 +11,7 @@ import {NewSearchPageComponent, SearchForm} from "./searchUtils/newSearchPage.co
|
||||||
import {properties} from "../../../environments/environment";
|
import {properties} from "../../../environments/environment";
|
||||||
import {RefineFieldResultsService} from "../services/refineFieldResults.service";
|
import {RefineFieldResultsService} from "../services/refineFieldResults.service";
|
||||||
import {zip} from "rxjs";
|
import {zip} from "rxjs";
|
||||||
|
import {StringUtils} from "../utils/string-utils.class";
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -251,8 +252,17 @@ export class SearchOrganizationsComponent {
|
||||||
// this.csvParams ="&fq="+this.resourcesQuery;
|
// this.csvParams ="&fq="+this.resourcesQuery;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
let openOrgsId = properties.environment != "production" ? "openaire____::0362fcdb3076765d9c0041ad331553e8" : "";
|
||||||
|
var basicQuery = "(reldatasourcecompatibilityid exact driver or reldatasourcecompatibilityid exact driver-openaire2.0 or " +
|
||||||
|
"reldatasourcecompatibilityid exact openaire2.0 or reldatasourcecompatibilityid exact openaire3.0 or reldatasourcecompatibilityid exact openaire4.0 or " +
|
||||||
|
"reldatasourcecompatibilityid exact openaire-cris_1.1 or " +
|
||||||
|
"reldatasourcecompatibilityid exact openaire2.0_data or reldatasourcecompatibilityid exact hostedBy or relproject=* " +
|
||||||
|
"or reldatasourcecompatibilityid = native" +
|
||||||
|
(openOrgsId ? (" or collectedfromdatasourceid="+StringUtils.quote(openOrgsId)) : "") +
|
||||||
|
")";
|
||||||
this.csvParams = (parameters ? ("&fq=("+parameters) : "") + (parameters ? ")" : "");
|
this.csvParams = (parameters ? ("&fq=("+parameters) : "") + (parameters ? ")" : "");
|
||||||
this.csvParams += (refineFieldsFilterQuery ? refineFieldsFilterQuery : "");
|
this.csvParams += (refineFieldsFilterQuery ? refineFieldsFilterQuery : "");
|
||||||
|
this.csvParams += "&fq="+basicQuery;
|
||||||
|
|
||||||
//var errorCodes:ErrorCodes = new ErrorCodes();
|
//var errorCodes:ErrorCodes = new ErrorCodes();
|
||||||
this.searchUtils.status = this.errorCodes.LOADING;
|
this.searchUtils.status = this.errorCodes.LOADING;
|
||||||
|
|
|
@ -60,10 +60,14 @@ export class SearchOrganizationsService {
|
||||||
advancedSearchOrganizations (params: string, page: number, size: number, properties:EnvProperties, refineParams:string=null, refineFields:string[] =null, refineQuery:string = null, minRef: boolean = false):any {
|
advancedSearchOrganizations (params: string, page: number, size: number, properties:EnvProperties, refineParams:string=null, refineFields:string[] =null, refineQuery:string = null, minRef: boolean = false):any {
|
||||||
// &type=organizations
|
// &type=organizations
|
||||||
let url = properties.searchAPIURLLAst+"resources2/?format=json";
|
let url = properties.searchAPIURLLAst+"resources2/?format=json";
|
||||||
|
let openOrgsId = properties.environment != "production" ? "openaire____::0362fcdb3076765d9c0041ad331553e8" : "";
|
||||||
var basicQuery = "(reldatasourcecompatibilityid exact driver or reldatasourcecompatibilityid exact driver-openaire2.0 or " +
|
var basicQuery = "(reldatasourcecompatibilityid exact driver or reldatasourcecompatibilityid exact driver-openaire2.0 or " +
|
||||||
"reldatasourcecompatibilityid exact openaire2.0 or reldatasourcecompatibilityid exact openaire3.0 or reldatasourcecompatibilityid exact openaire4.0 or " +
|
"reldatasourcecompatibilityid exact openaire2.0 or reldatasourcecompatibilityid exact openaire3.0 or reldatasourcecompatibilityid exact openaire4.0 or " +
|
||||||
"reldatasourcecompatibilityid exact openaire-cris_1.1 or " +
|
"reldatasourcecompatibilityid exact openaire-cris_1.1 or " +
|
||||||
"reldatasourcecompatibilityid exact openaire2.0_data or reldatasourcecompatibilityid exact hostedBy or relproject=*)";
|
"reldatasourcecompatibilityid exact openaire2.0_data or reldatasourcecompatibilityid exact hostedBy or relproject=* " +
|
||||||
|
"or reldatasourcecompatibilityid = native" +
|
||||||
|
(openOrgsId ? (" or collectedfromdatasourceid="+StringUtils.quote(openOrgsId)) : "") +
|
||||||
|
")";
|
||||||
|
|
||||||
// url += "&query=";
|
// url += "&query=";
|
||||||
if(params!= null && params != '' ) {
|
if(params!= null && params != '' ) {
|
||||||
|
@ -219,10 +223,15 @@ export class SearchOrganizationsService {
|
||||||
|
|
||||||
numOfSearchOrganizations2(params: string, properties:EnvProperties, refineParams:string=null ):any {
|
numOfSearchOrganizations2(params: string, properties:EnvProperties, refineParams:string=null ):any {
|
||||||
let url = properties.searchAPIURLLAst+"resources2/?format=json&size=0&type=organizations";
|
let url = properties.searchAPIURLLAst+"resources2/?format=json&size=0&type=organizations";
|
||||||
var basicQuery = "(reldatasourcecompatibilityid exact driver or reldatasourcecompatibilityid exact driver-openaire2.0 or " +
|
|
||||||
|
let openOrgsId = properties.environment != "production" ? "openaire____::0362fcdb3076765d9c0041ad331553e8" : "";
|
||||||
|
var basicQuery = "(reldatasourcecompatibilityid exact driver or reldatasourcecompatibilityid exact driver-openaire2.0 or " +
|
||||||
"reldatasourcecompatibilityid exact openaire2.0 or reldatasourcecompatibilityid exact openaire3.0 or reldatasourcecompatibilityid exact openaire4.0 or " +
|
"reldatasourcecompatibilityid exact openaire2.0 or reldatasourcecompatibilityid exact openaire3.0 or reldatasourcecompatibilityid exact openaire4.0 or " +
|
||||||
"reldatasourcecompatibilityid exact openaire-cris_1.1 or " +
|
"reldatasourcecompatibilityid exact openaire-cris_1.1 or " +
|
||||||
"reldatasourcecompatibilityid exact openaire2.0_data or reldatasourcecompatibilityid exact hostedBy or relproject=*)";
|
"reldatasourcecompatibilityid exact openaire2.0_data or reldatasourcecompatibilityid exact hostedBy or relproject=*" +
|
||||||
|
"or reldatasourcecompatibilityid = native" +
|
||||||
|
(openOrgsId ? (" or collectedfromdatasourceid=" + StringUtils.quote(openOrgsId)) : "") +
|
||||||
|
")";
|
||||||
|
|
||||||
// url += "&query=";
|
// url += "&query=";
|
||||||
if(params!= null && params != '' ) {
|
if(params!= null && params != '' ) {
|
||||||
|
|
|
@ -7,6 +7,7 @@ import {throwError} from 'rxjs';
|
||||||
import{EnvProperties} from '../properties/env-properties';
|
import{EnvProperties} from '../properties/env-properties';
|
||||||
|
|
||||||
import {catchError, map} from "rxjs/operators";
|
import {catchError, map} from "rxjs/operators";
|
||||||
|
import {StringUtils} from "../string-utils.class";
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class EntitiesSearchService {
|
export class EntitiesSearchService {
|
||||||
public ready:boolean = false;
|
public ready:boolean = false;
|
||||||
|
@ -60,9 +61,11 @@ export class EntitiesSearchService {
|
||||||
//reldatasourcecompatibilityid exact driver or reldatasourcecompatibilityid exact driver-openaire2.0 or reldatasourcecompatibilityid exact openaire2.0 or reldatasourcecompatibilityid exact openaire3.0 or reldatasourcecompatibilityid exact openaire2.0_data or reldatasourcecompatibilityid exact hostedBy or relproject=*
|
//reldatasourcecompatibilityid exact driver or reldatasourcecompatibilityid exact driver-openaire2.0 or reldatasourcecompatibilityid exact openaire2.0 or reldatasourcecompatibilityid exact openaire3.0 or reldatasourcecompatibilityid exact openaire2.0_data or reldatasourcecompatibilityid exact hostedBy or relproject=*
|
||||||
|
|
||||||
|
|
||||||
|
let openOrgsId = properties.environment != "production" ? "openaire____::0362fcdb3076765d9c0041ad331553e8" : "";
|
||||||
//url += "((oaftype exact organization and deletedbyinference=false )"+
|
//url += "((oaftype exact organization and deletedbyinference=false )"+
|
||||||
url += "((oaftype exact organization and deletedbyinference=false and"+
|
url += "((oaftype exact organization and deletedbyinference=false and"+
|
||||||
"(reldatasourcecompatibilityid=driver or reldatasourcecompatibilityid=driver-openaire2.0 or reldatasourcecompatibilityid=openaire2.0 or reldatasourcecompatibilityid=openaire3.0 or reldatasourcecompatibilityid=openaire4.0 or reldatasourcecompatibilityid=openaire2.0_data or reldatasourcecompatibilityid=hostedBy or relprojectid=* or reldatasourcecompatibilityid = native))"+
|
"(reldatasourcecompatibilityid=driver or reldatasourcecompatibilityid=driver-openaire2.0 or reldatasourcecompatibilityid=openaire2.0 or reldatasourcecompatibilityid=openaire3.0 or reldatasourcecompatibilityid=openaire4.0 or reldatasourcecompatibilityid=openaire2.0_data or reldatasourcecompatibilityid=hostedBy or relprojectid=* or reldatasourcecompatibilityid = native"+
|
||||||
|
(openOrgsId ? (" or collectedfromdatasourceid="+StringUtils.quote(openOrgsId)) : "") +"))"+
|
||||||
" and ((organizationlegalname all "+'"'+keyword+'"'+") or (organizationlegalshortname all "+'"'+keyword+'"'+")) " +
|
" and ((organizationlegalname all "+'"'+keyword+'"'+") or (organizationlegalshortname all "+'"'+keyword+'"'+")) " +
|
||||||
// "and " + this.quote(params) + " " +
|
// "and " + this.quote(params) + " " +
|
||||||
//"and (collectedfrom exact "+StringUtils.quote(StringUtils.URIEncode(DepositType))+")) "
|
//"and (collectedfrom exact "+StringUtils.quote(StringUtils.URIEncode(DepositType))+")) "
|
||||||
|
|
Loading…
Reference in New Issue