Setting the query to use the AND operator is achieved by:
$query->addParam('mm', '100%');
However, since apachesolr 1.2, this gets stored as an array with a another value of '1'.
So the operator does not get set.
I've set 'mm' to be one of the "single_value_params" which fixes it.

I'll submit a patch if this is correct. If not what's the proper way now?

Using the param 'mm' is suggested in the closed issue at http://drupal.org/node/1559394

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pwolanin’s picture

Yes, please post the patch.

theapi’s picture

Patch attached to add 'mm' => TRUE, to the $single_value_params array.

juampynr’s picture

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

Patch applies cleanly and fixes the issue. I could set the mm parameter to 100% after applying it.

juampynr’s picture

Removed white space from the last line of the patch.

Nick_vh’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thanks!

Nick_vh’s picture

Version: 7.x-1.x-dev » 6.x-3.x-dev
Status: Fixed » Patch (to be ported)

Obviously needs backport :)

  • Commit 9b5cac1 on 7.x-1.x by Nick_vh:
    Issue #2023349 by juampy, theapi: Fixed addParam('mm', '100%') does not...