Revision 58940
Added by Argiro Kokogiannaki almost 4 years ago
newSearchPage.component.ts | ||
---|---|---|
770 | 770 |
} |
771 | 771 |
private static createQuotedKeywordQuery(fieldValue, fieldId, fieldOperator, countParams:number, isSearchAll:boolean, forceQuotted:boolean=false){ |
772 | 772 |
let params = ""; |
773 |
let quotedParts = (fieldValue)?fieldValue.match(/(["'])(.*?)*?\1/g):[]; |
|
773 |
let countQuote = (fieldValue.match(/'/g) || []).length; |
|
774 |
let countDoubleQuote = (fieldValue.match(/"/g) || []).length; |
|
775 |
let quotedParts = []; |
|
776 |
if(countQuote % 2 == 0 && countDoubleQuote % 2 ==0){ |
|
777 |
console.log("Allow quoting"); |
|
778 |
quotedParts = (fieldValue)?fieldValue.match(/(["'])(.*?)*?\1/g):[]; |
|
779 |
} |
|
774 | 780 |
// params+= (countParams == 0 ? "" : fieldOperator) + |
775 | 781 |
params+= " ("; |
776 | 782 |
if(forceQuotted){ |
Also available in: Unified diff
[Library|Trunk]
Landing pages: add check for openaire id
Search Page: support quoted queries only if the number is even