We recently set-up a fresh SuiteCRM 8.9.2 instance from scratch using the self-install script from here: https://github.com/motaviegas/SuiteCRM_Script/ The system works fine with one exception. When we use basic search the only fields that seem to be indexed for Targets (Prospects) are the contact name and nothing else - no results from any other Target fields are found. I tried the past guidance of copying the …/public/legacy/modules/Prospects/metadata/searchdefs.php file to the “custom” directory structure and editing it to include all of the fields we need (most importantly “account_name”) and then doing a Repair → Quick Repair and Rebuild, but this did not work. I also tried installing ElasticSearch but could never get it to integrate properly either. I’m most interested in just getting global “Basic Search” to work the way we want and keep things simple for now. My AI helper tells me that it may simply be hardwired in the 8.9.X versions until a future release solves it and I’ll just have to wait. Any help is much appreciated. Thanks!
I’ve tried modifying config.php to have: ‘search_wildcard_infront’ => true and it did not help.
Thanks.
Hello,
that is a bit of code adjustment work:
Try to avoid ElasticSearch - that’s just too complex and not needed at all at the beginning.
Make sure that you edit the correct files.
Add fields one by one and test after every change.
SOLVED!
Thanks BastianHammer, that video was helpful. To simplify it for others, here are the exact steps I did to make account names searchable in Targets:
Copy the core Prospects SearchFields.php file to the custom directory so it’s not overwritten by updates:
sudo cp /var/www/html/crm/public/legacy/modules/Prospects/metadata/SearchFields.php /var/www/html/crm/public/legacy/custom/modules/Prospects/metadata/
Edit the file and add this block directly following
$searchFields[‘Prospects’] =
array(
INSERT THIS:
‘account_name’ => array(
‘query_type’ => ‘default’,
‘db_field’ => array(‘account_name’),
‘force_unifiedsearch’ => true
),
THE REST OF THE FILE IS BELOW THIS SECTION
Save the file and exit the editor
Admin → Repair → Quick Repair and Rebuild
Great, glad that it worked.
And thanks for the how to outline.