Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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
Comment | File | Size | Author |
---|---|---|---|
#4 | add_mm_to_single_value_params-2023349-4.patch | 396 bytes | juampynr |
#2 | add_mm_to_single_value_params-2023349-2.patch | 397 bytes | theapi |
Comments
Comment #1
pwolanin CreditAttribution: pwolanin commentedYes, please post the patch.
Comment #2
theapi CreditAttribution: theapi commentedPatch attached to add
'mm' => TRUE,
to the$single_value_params
array.Comment #3
juampynr CreditAttribution: juampynr commentedPatch applies cleanly and fixes the issue. I could set the mm parameter to 100% after applying it.
Comment #4
juampynr CreditAttribution: juampynr commentedRemoved white space from the last line of the patch.
Comment #5
Nick_vhCommitted. Thanks!
Comment #6
Nick_vhObviously needs backport :)