mirror of
https://github.com/vale981/Vulcan
synced 2025-03-09 04:16:37 -04:00
15 lines
No EOL
466 B
JavaScript
15 lines
No EOL
466 B
JavaScript
function addSearchQueryParameter (parameters, terms) {
|
|
if(!!terms.query) {
|
|
var parameters = Telescope.utils.deepExtend(true, parameters, {
|
|
selector: {
|
|
$or: [
|
|
{title: {$regex: terms.query, $options: 'i'}},
|
|
{url: {$regex: terms.query, $options: 'i'}},
|
|
{body: {$regex: terms.query, $options: 'i'}}
|
|
]
|
|
}
|
|
});
|
|
}
|
|
return parameters;
|
|
}
|
|
Telescope.callbacks.add("postsParameters", addSearchQueryParameter); |