Revision 44739
Added by Argiro Kokogiannaki over 7 years ago
searchPage.component.ts | ||
---|---|---|
125 | 125 |
} |
126 | 126 |
var keyword = params['keyword']; |
127 | 127 |
console.info("Type:" + this.type + "filters: "+(this.type == 'publication'?allFqs:parameters)); |
128 |
return (keyword && keyword.length > 0?'q='+keyword+"&op=and":'')+(this.type == 'publication'?allFqs:parameters); |
|
128 |
var doiQuery =(keyword && keyword.length > 0 && keyword.split(" ").length ==1 )?'or ((pidclassid exact doi) and (pid exact "'+ keyword+'"))':""; |
|
129 |
var keywordQuery =(doiQuery.length > 0 )? "((" + this.quote(keyword) + ")" + doiQuery + ")":this.quote(keyword); |
|
130 |
return (keyword && keyword.length > 0?'q='+(this.type == 'publication' ||this.type == 'dataset' ?keywordQuery:keyword)+"&op=and":'')+(this.type == 'publication'?allFqs:parameters); |
|
129 | 131 |
} |
130 | 132 |
public getIndexQueryParametersFromUrl(params){ |
131 | 133 |
var parameters = ""; |
... | ... | |
155 | 157 |
|
156 | 158 |
} |
157 | 159 |
var keyword = params['keyword']; |
158 |
parameters += (keyword && keyword.length > 0?' and '+keyword+' ':''); |
|
160 |
var doiQuery =(keyword.length > 0 && keyword.split(" ").length ==1 )?'or ((pidclassid exact doi) and (pid exact "'+ keyword+'"))':""; |
|
161 |
var keywordQuery =(doiQuery.length > 0 )? "((" + this.quote(keyword) + ")" + doiQuery + ")":this.quote(keyword); |
|
162 |
// parameters += (keyword && keyword.length > 0?' and '+(this.type == 'publication' ||this.type == 'dataset' ?keywordQuery:keyword)+' ':''); |
|
159 | 163 |
// allFqs += ; |
160 | 164 |
|
161 |
return (keyword && keyword.length > 0?' and '+keyword+' ':'')+allFqs;
|
|
165 |
return (keyword && keyword.length > 0?' and '+(this.type == 'publication' ||this.type == 'dataset' ?keywordQuery:keyword)+' ':'')+allFqs;
|
|
162 | 166 |
} |
163 | 167 |
/* |
164 | 168 |
* Mark as check the new filters that are selected, when you get them from search |
... | ... | |
245 | 249 |
} |
246 | 250 |
} |
247 | 251 |
//TODO when final search is done- remove op=and from keyword |
248 |
return (this.searchUtils.keyword.length > 0?'q='+this.searchUtils.keyword+"&op=and":'')+(this.type == 'publication'?allFqs:allLimits); |
|
252 |
var doiQuery =(this.searchUtils.keyword.length > 0 && this.searchUtils.keyword.split(" ").length ==1 )?'or ((pidclassid exact doi) and (pid exact "'+ this.searchUtils.keyword+'"))':""; |
|
253 |
var keywordQuery =(doiQuery.length > 0 )? "((" + this.quote(this.searchUtils.keyword) + ")" + doiQuery + ")":this.quote(this.searchUtils.keyword); |
|
254 |
return (this.searchUtils.keyword.length > 0?'q='+(this.type == 'publication' ||this.type == 'dataset' ?keywordQuery:this.searchUtils.keyword)+"&op=and":'')+(this.type == 'publication'?allFqs:allLimits); |
|
249 | 255 |
} |
250 | 256 |
private createIndexQueryParameters(filters:Filter[]){ |
251 | 257 |
//TODO |
... | ... | |
275 | 281 |
} |
276 | 282 |
} |
277 | 283 |
// allLimits += (this.searchUtils.keyword && this.searchUtils.keyword.length > 0?' and '+this.searchUtils.keyword+' ':''); |
278 |
return (this.searchUtils.keyword && this.searchUtils.keyword.length > 0?' and '+this.searchUtils.keyword+' ':'')+allFqs; |
|
284 |
var doiQuery =(this.searchUtils.keyword.length > 0 && this.searchUtils.keyword.split(" ").length ==1 )?'or ((pidclassid exact doi) and (pid exact "'+ this.searchUtils.keyword+'"))':""; |
|
285 |
var keywordQuery =(doiQuery.length > 0 )? "((" + this.quote(this.searchUtils.keyword) + ")" + doiQuery + ")":this.quote(this.searchUtils.keyword); |
|
286 |
return (this.searchUtils.keyword && this.searchUtils.keyword.length > 0?' and '+(this.type == 'publication' ||this.type == 'dataset' ?keywordQuery:this.searchUtils.keyword)+' ':'')+allFqs; |
|
279 | 287 |
} |
280 | 288 |
// |
281 | 289 |
private isFiltered(){ |
Also available in: Unified diff
In pubs/data search page: Search also for DOI when keyword is only one word| In pubs/data Advanced search page: new field PID