These filters will be added in hook_search (google_appliance_search). Which will filter the search results according to metadata. The filters should contain the metadata to be filtered and the value you want to filter.
// Code bellongs to _google_appliance_search(&$gm) that perform the search.
$filters = module_invoke_all('search_add_filters', $filters = array());
foreach ($filters as $filter_name => $filter_value) {
$gm->addMetaDataFilter($filter_name, $filter_value);
}
// This is the hook that will retrieve the filters
function google_appliance_search_add_filters($filters = array()) {
return $filters;
}
Comment | File | Size | Author |
---|---|---|---|
#1 | addmetatagsfilter-1430134.patch | 1.32 KB | gabrielmachadosantos |
google_appliance.zip | 29.32 KB | gabrielmachadosantos |
Comments
Comment #1
gabrielmachadosantos CreditAttribution: gabrielmachadosantos commentedSending the patch file, I hope this can be merged soon.
Comment #2
jribeiro CreditAttribution: jribeiro commented@gabrielmachadosantos,
Your patch worked for me. Changing the status of the ticket.