In an apachesolr_modify_query hook, I set local params ex and tag for various purposes. Note that I'm not using these local params to do OR faceting, so the special case in the 6.x-2.x branch - if (!$has_or ...) { - is no use.
A more general solution would be preferred. Here's something that would fix the bug for my case and the 6.x-2.x $has_or case, in all versions of apachesolr.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 648036.patch | 1.56 KB | jpmckinney |
| #2 | 648036.patch | 1.53 KB | jpmckinney |
| patch.patch | 933 bytes | jpmckinney |
Comments
Comment #1
pwolanin commentedLooks like a bug indeed, but note from php.net re: strstr():
Also, should we consider just moving one or more fqs if possible for the performance reasons even if we cannot move all?
In other words we should possibly test each fq, not the imploded list of them?
Comment #2
jpmckinney commentedRe-rolled to test each fq.
It also omits filter queries starting with '-', as these don't seem to work in q.alt. I discovered this when doing a key-less search with a -language:fr filter using apachesolr 6.x-2.x.
Comment #3
jpmckinney commentedThis last patch is against 6.x-2.x, but a patch that excludes the $has_or changes will work against 6.x-1.x.
Comment #4
pwolanin commentedshould probably check
before this line:
Comment #5
jpmckinney commentedAmended.
Comment #6
jpmckinney commentedFixed as part of #552152-12: OR facet counts are confusing. Only relevant to 6.x-2.x.
Comment #7
pwolanin commentedthe original bug is relevant to all branches
Comment #8
jpmckinney commentedFixed in 6-1 and 5-2.
http://drupal.org/cvs?commit=361242
http://drupal.org/cvs?commit=361240