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.
- 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.
LEFT JOIN civicrm_location.... civicrm_email LIKE '%yahoo%'
WHERE civicrm_contact.sort_name LIKE 'Green%'