Issue #7940 by cableman: Cleaned up the search factory