I try to create a custom search link like this :
l(t('See our Job Ads'), 'search', array('query' => array('f[0]' => 'is_recruiter_nid:' . $nid )));
when i click on the link nothing get filtered.
P.S : i have added the filter 'is_recruiter_nid
' in code using the hook_search_api_solr_documents_alter()
Something like:
function MYMODULE_search_api_solr_documents_alter(array &$documents, SearchApiIndex $index, array $items) {
foreach ($documents as $document) {
...
$document->setField('is_recruiter_nid', $recruiter->nid);
}
}
How I can do this? Is there any example ?
Thanks for your help.