I have my own custom search module that has a custom search page using apachesolr_search to perform its searches.

Trying to duplicate as little code as possible I am using apachesolr_search_view by having:

/**
 * Implementation of hook_menu_alter().
 */
function mymodule_menu_alter(&$menu) {
  if (isset($menu['search/mymodule/%menu_tail'])) {
    $menu['search/mymodule/%menu_tail']['page callback'] = 'apachesolr_search_view';
  }
}

Because apachesolr_search_view specifically checks that the search type is apachesolr_search when it looks for filters in the url searching with facets only doesn't work unless I duplicate this function.

I don't see any reason why this should be limited to the apachesolr_search search type.

Here is a patch that removes this limit, allowing other modules to use this functionality.
I'm using the 6.x-1.x-dev version and have not actually tested the 6.x-2.x-dev version.

Comments

agileware’s picture

Damn patches didn't attach again.

pwolanin’s picture

Well, I think my concern was about the fact we are doing this in the menu_alter:

    $menu['search']['page callback'] = 'apachesolr_search_view';
pwolanin’s picture

Status: Needs review » Fixed
StatusFileSize
new2.01 KB

patch didn't apply to 6.x-1.x do to function changes. committed patch attached.

committed to all active branches.

agileware’s picture

Awesome, thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.