mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 12:36:39 -04:00
15 lines
462 B
JavaScript
15 lines
462 B
JavaScript
![]() |
function addSearchQueryParameter (parameters, terms) {
|
||
|
if(!!terms.query) {
|
||
|
var parameters = Telescope.utils.deepExtend(true, parameters, {
|
||
|
find: {
|
||
|
$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);
|