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;
}

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gabrielmachadosantos’s picture

Sending the patch file, I hope this can be merged soon.

jribeiro’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

@gabrielmachadosantos,
Your patch worked for me. Changing the status of the ticket.