Closed (fixed)
Project:
Apache Solr Search
Version:
6.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Aug 2010 at 13:11 UTC
Updated:
7 Apr 2011 at 16:11 UTC
Jump to comment: Most recent file
Comments
Comment #1
jpmckinney commentedI can confirm that the bug exists in the dev release, too. Good catch.
Comment #2
mustanggb commentedThis is a pretty big WTF no?
Comment #3
pwolanin commentedThis should already be fixed via: http://drupal.org/cvs?commit=466956
Comment #4
mustanggb commentedWell I was running off "1.1.4.40.2.32" (i.e. http://drupal.org/cvs?commit=466956) and it is still a problem
Here is my example situation
In
$pos = strpos($this->filterstring, $filter['#query']);you always compare against$this->filterstringWhich for me is "tid:3 tid:11 tid:1 tid:12"
The first
$filter['#query']compared is " tid:12" which correctly returns "18"The second is " tid:11" which correctly returns "5"
The third is " tid:1" which wrongly returns "5"
The fourth is "tid:3" which correctly returns "0"
Comment #5
pwolanin commentedAh, I see - it is related to but not the same as the other bug.
Here's a possible 7.x fix, which I think will also apply to 6.x. I prefer strpos() if possible since it's much faster.
Comment #6
pwolanin commentedComment #7
pwolanin commentedFound another bug at the same time while writing a unit test - we do not want to use the get_fq() function to generate the query string, since filters may be groups and hence re-ordered.
Comment #8
pwolanin commentedcommitted that to 7.x
Here's a 6.x-2.x version of the patch.
Comment #9
mustanggb commentedFantastic job, thanks for following this up
Comment #10
pwolanin commentedIs the patch working for you?
Comment #11
mustanggb commentedR'd previously, have now T'd, working as expected
Comment #12
pwolanin commentedcommitted to 6.x-2.x, but the 6.x-1.x version needs to look slightly different I think.
Comment #13
jpmckinney commentedUntested.
Comment #14
pwolanin commentedI'm trying to recall - I think there was a difference in 6.x-2.x vs. 6.x-1.x that means the change to get_url_queryvalues() is not needed. Likely it will not hurt, but not needed.
Comment #15
pwolanin commentedSide note, for good or ill, the change I made to 7.x-1.x/6.x-2.x means you won't see subqueries reflected in the URL. My thinking there was that the code doesn't handle parsing them from the URL, so there is no way we should be showing them.
However, I think if we switch to a ?f[]= querystring for each fq, we might indeed want/need to be able to parse them from the URL.
The is just the latter part of the patch above - I think that's all that's need to fix the bug in 6.x-1.x.
Comment #16
jpmckinney commentedThe previous patches fixed two bugs. The other bug you described as "Found another bug at the same time while writing a unit test - we do not want to use the get_fq() function to generate the query string, since filters may be groups and hence re-ordered." Does that bug not exist in 6.x-1.x?
Comment #17
pwolanin commentedThat bug does not existing in 6.x-1.x afaik, since we don't do the filter grouping which is part of the OR facet logic.
Comment #18
jpmckinney commentedApplied #15 to 6.1