Details
-
Type: Patch
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.0.7
-
Fix Version/s: Unscheduled
-
Component/s: Core CiviCRM
-
Labels:None
-
Documentation Required?:None
-
Funding Source:Needs Funding
Description
On current trunk revision 37348.
Both CRM_Contact_Form_Search::preProcess and ::postProcess create their own instances of the customSelector class which in turn executes the search query based on slightly different parameters. I believe the difference in these parameters to be (likely) a bug that was not caught due to this redundancy; the second search was the only one whose results were seen. Additionally in the special case of the full-text searcher, a third set of search queries are made because the selectors created by the parent class are not persisted to class variables and made available for future use.
This patch persists the first selector and references it in the other two locations that reference it for significant savings when search queries are expensive.