Details
-
Type: Improvement
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: None
-
Fix Version/s: 1.7
-
Component/s: Core CiviCRM
-
Labels:None
Description
Rationale
========
Currently, both Basic and Advanced Search provide a single search criteria field which queries on sort_name AND email address data, AND adds % wildcard to both front and back of string. This results in extremely inefficient queries, particularly problematic in larger datasets.
Implementation
============
- Modify Advanced Search forms to provide separate "Name" and "Email" input fields.
- Modify search query construction to NOT automatically wildcard the beginning of either of these critieria. The tails should still be wildcarded.
EXAMPLE:
Name: Green
Email: %yahoo
Query contains:
LEFT JOIN civicrm_location.... civicrm_email LIKE '%yahoo%'
WHERE civicrm_contact.sort_name LIKE 'Green%'