Problem

According to #1432912: Move Acquia search module to contrib? issue and Commons make file history:

  1. Before 6.x-2.7 Commons used http://network.acquia.com/files/downloads/acquia-search-current.tar.gz which contained http://drupal.org/project/apachesolr module and other relevant stuff that need to be downloaded manually otherwise.
  2. Then Commons switched to http://drupal.org/project/acquia_search but that module doesn't contain http://drupal.org/project/apachesolr.

Proposed resolution

Include http://drupal.org/project/apachesolr module in Commons make file.

Is it possible to also download automagically that extra stuff e.g. SolrPhpClient? :/

Original report by Andrea C

In Commons until version 6.x-2.6 was available the module "Apache Solr framework".
It was located in
profiles/drupal_commons/modules/acquia/acquia_search/apachesolr

Thanks to this module and to a local installation of the Apache Solr search engine we could have very usefull faceted search (see attached image), without the need of an Acquia Network subscription (our security policy doesn't allow to send data outside the company)

We upgrade Commons to 6.x-2.7, using the full package form https://network.acquia.com/downloads/drupal-commons but
the "Apache Solr framework" module has now been removed.
We restored the module form the backup and we put it in sites/all/modules so we can still use it but we think this module deserve to be part of the Commons distribution.
We all want to improve Commons so why this important feature has been removed?
Do we get the same results (faceted search) in other better ways?

Thanks

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lightsurge’s picture

The acquia search module has been posted on drupal.org

http://drupal.org/project/acquia_search

But it actually sounds like you'd be as well using

http://drupal.org/project/apachesolr

If its been removed I'm not sure why, might be a mistake, I know it was moved to drupal.org to facilitate packaging it into Commons on drupal.org #1432912: Move Acquia search module to contrib? so doesn't seem like it would be intentionally removed.

mariomaric’s picture

Related issue: #1432912: Move Acquia search module to contrib?

Hm, as far as I can see from the Commons make file and according to above mentioned issue:

1) Before 6.x-2.7 Commons used http://network.acquia.com/files/downloads/acquia-search-current.tar.gz which obviously contained http://drupal.org/project/apachesolr module.
2) They switched to http://drupal.org/project/acquia_search but that module doesn't contain http://drupal.org/project/apachesolr

@lighsurge: You are really fast! :P

lightsurge’s picture

They switched to http://drupal.org/project/acquia_search but that module doesn't contain http://drupal.org/project/apachesolr

Ahh that makes sense. Fast, but not as on target ;)

mariomaric’s picture

Title: Why the Apache Solr framework as been removed from Commons 6.x-2.7 ? » Include Apache Solr Search Integration in Commons (again)
Version: 6.x-2.7 » 6.x-2.x-dev

So, the workouraund is to install http://drupal.org/project/apachesolr manually - or just like you did - restore from backup i.e. Commons 6.x-2.6.

I changed issue title to represent more precisely what is going on. ;)

Andrea C’s picture

You are really fast!
May be there is a reason: in commons the faceted search has been thought as provided by Acquia Search, an hosted web service from Acquia. It seems the Apache Solr Framework was included as a component of Acquia Search, not to be used alone.
But this is what I did:

  1. disabled Acquia Search
  2. disabling Acquia Search you get unlocked the configuration of Apache Solr settings
  3. configure the Apache Solr module setting to point to the local installation of Apache Solr search engine
  4. In the Apache Solr setting --> advanced configuration: Make Apache Solr Search the default:
  5. In the Apache Solr setting --> enabled filters: enabled the filters desired to be available to users
  6. Configure the Context module to show the Apache solar filters in "Sidebar First"

This post is also related to http://groups.drupal.org/node/236508
It's talking about how to better find information in Commons...
From one side we need to better classify content in Commons through Taxonomy and, very important, Folksonomy (that for me seem missing in Commons);
on the other side how to easily find what we are looking for thanks to Apache Solr

mariomaric’s picture

Title: Include Apache Solr Search Integration in Commons (again) » Include Apache Solr Search Integration module in Commons
Category: feature » bug

IMHO this is definitely bug, so I changed category and updated issue summary.

ezra-g’s picture

Issue tags: +Commons 2.8 radar

Agreed - This was a regression not detected when we switched to the Drupal.org copy of Acquia search. I apologize for any inconvenience and will make sure this is fixed for the 2.8 Commons release.

Luckily, in the meantime the mitigation is quite simple: Download the ApacheSolr module.

Thanks for pointing this out.

ezra-g’s picture

Status: Active » Needs review

It would be great to get some testing on a 6.x-2.6=>6.x-2.8 upgrade that verifies that there are no errors as a result of moving apachesolr* modules to /contrib instead of the /acquia directory.

ezra-g’s picture

ezra-g’s picture

Status: Needs review » Needs work

In Commons 2.6 and below:

select filename from system where name = 'apachesolr_search';
+------------------------------------------------------------------------------------------+
| filename |
+------------------------------------------------------------------------------------------+
| profiles/drupal_commons/modules/acquia/acquia_search/apachesolr/apachesolr_search.module |
+------------------------------------------------------------------------------------------+

We need to either change the path where apachesolr_search lives via Drush make or an update to the system table.

ezra-g’s picture

Status: Needs work » Fixed

I verified that this change to the Drush make file places the latest Apachesolr module in the same location as Commons 2.6 and below: profiles/drupal_commons/modules/acquia/acquia_search/apachesolr/apachesolr_search.module.

http://drupalcode.org/project/commons.git/commitdiff/154a76d?hp=183d033f...

ezra-g’s picture

Status: Fixed » Needs work

Getting the files in place wasn't sufficient here.

On a test build I got the following after enabling Acquia_Search module and its Apachesolr dependencies.

Fatal error: Call to undefined function apachesolr_has_searched() in /Users/ezra/Developer/htdocs/dev/acquia/commons_nightly_dev_7-5-1/profiles/drupal_commons/modules/acquia/acquia_search/apachesolr/apachesolr_search.module on line 573

ezra-g’s picture

Status: Needs work » Fixed

I was able to resolve that problem by ensuring we grab the latest from the 1.x branch of apchesolr_search that does not contain an apachesolr_search.make.

http://drupalcode.org/project/commons.git/blobdiff/3811651d363802e0bcee1...

Andrea C’s picture

After updating from Commons 6.x-2.7 to 6.x-2.9 (jump over 2.8), using the full package from Acquia, I found apachesolr module back in profiles/drupal_commons/modules/acquia/acquia_search/apachesolr but inside this folder two libraries where missing (compared to same module in 6.x-2.6) :
- SolrPhpClient (reported as missing also by admin/reports/status )
- Zend
I recover both from the backup

mariomaric’s picture

Status: Fixed » Active

Hi Andrea!

As stated in README.txt you need to manually download those libraries...

BUT, we could also use d.o make file and include Solr PHP client - it is included in Drupal.org Library Packaging Whitelist.

I will try to fix it this weekend, in meantime, workaround is to download it manually.

mariomaric’s picture

Status: Active » Needs review
Issue tags: -Commons 2.8 radar +Commons 2.10 radar
FileSize
2.2 KB

@ezra-g regarding #13: in Drush command to get PHP client can't run issue apachesolr.make was renamed to apachesolr.make.example - this is why 6.x-1.x version is working - it's related with some Drush make recursion bug, although it supposed to be fixed...

Regarding additional libraries that apachesolr module require, I included SolrPHPClient in drupal_commons.make file (mostly c/p from apachesolr.make.example file).
Zend library is only needed for PHP < 5.2.0 (more than 6 years old and unsupported version of PHP) and it's not whitelisted in Drupal.org Library Packaging Whitelist - so I suppose we don't need to include it (although it is included in http://network.acquia.com/files/downloads/acquia-search-current.tar.gz which Commons used before 6.x-2.7).

I also fixed download type method for other libraries in drupal_commons.make file - Drush Make docs don't mention "get", only "file" method.

Patch attached.

ezra-g’s picture

Component: Code » Search
ezra-g’s picture

Issue summary: View changes

Update -- m.m