[Library|Trunk]

Search: createKeywordQuery() add properly the operator when it is needed.

LAnding result: set properly the type when the route changes and it is result.


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@59042 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2020-07-02 15:53:43 +00:00
parent 34fbdcf44b
commit eb1f91160a
2 changed files with 4 additions and 4 deletions

View File

@ -159,7 +159,8 @@ export class ResultLandingComponent {
this.linkToSearchPage = this.properties.searchLinkToOrps;
this.id = data['orpId'];
this.title = "Other Research Product";
} else if (data["id"]) {
} else if (data["id"]){
this.type = "result";
this.id = data["id"];
this.updateTitle("Research Result");
this.linkToLandingPage = this.properties.searchLinkToOrp;

View File

@ -701,7 +701,7 @@ export class NewSearchPageComponent {
} else {
params += this.createQuotedKeywordQuery(this.selectedFields[i].value, this.selectedFields[i].id, this.selectedFields[i].operatorId,countParams,true);
}*/
params +=(countParams == 0 ? "" : " " + this.selectedFields[i].operatorId + " ") + NewSearchPageComponent.createKeywordQuery(this.entityType,this.selectedFields[i].value, this.selectedFields[i].id, this.selectedFields[i].operatorId, countParams);
params += NewSearchPageComponent.createKeywordQuery(this.entityType,this.selectedFields[i].value, this.selectedFields[i].id, this.selectedFields[i].operatorId, countParams);
//TODO deposit case
// console.log(this.usedBy)
// console.log(this.keywordFields)
@ -774,10 +774,9 @@ export class NewSearchPageComponent {
let countDoubleQuote = (fieldValue.match(/"/g) || []).length;
let quotedParts = [];
if(countQuote % 2 == 0 && countDoubleQuote % 2 ==0){
console.log("Allow quoting");
quotedParts = (fieldValue)?fieldValue.match(/(["'])(.*?)*?\1/g):[];
}
// params+= (countParams == 0 ? "" : fieldOperator) +
params+= (countParams == 0 ? "" : fieldOperator);
params+= " (";
if(forceQuotted){
return this.getQuotedQueryPart(fieldId, '"'+ fieldValue+'"',isSearchAll);