I need to extend ApacheSolrFacetapiAdapter, which is easy enough to do by implementing hook_facetapi_adapters to provide my own adapter with a class extending ApacheSolrFacetapiAdapter and then using hook_facetapi_searcher_info_alter like so:

    if ($info['adapter'] === 'apachesolr') {
      $info['adapter'] = 'my_adapter';
    }

The problem is, that apachesolr_facetapi_facet_info does this:

  if ('apachesolr' == $searcher_info['adapter']) {

When it should really do this:

  if ('apachesolr' == $searcher_info['module']) {

Because, otherwise when I try to use my own extending adapter, all the facets disappear.

The 'adapter' key should be changeable, whereas there is no reason to wish to modify the module key.

I'd love to make a patch, but I'm all out of git at the moment :(

CommentFileSizeAuthor
#1 apachesolr-2311087-1.patch522 bytesjohnennew

Comments

johnennew’s picture

Category: Task » Bug report
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new522 bytes

Here is the patch @Angry Dan failed to provide when logging this issue!

I'm going to go out on a limb and set it straight to RTCB since he did everything but provide the patch and as far as I am concerned this just solved the issue and fix as described.

  • japerry committed cebff8c on 7.x-1.x authored by johnennew
    Issue #2311087 by johnennew: ApacheSolrFacetapiAdapter cannot be...
japerry’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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