SugarCRM 7 — Fix to re-enable ElasticSearch on custom modules

Posted on Thu 18 September 2014 in Tech

I had an issue in Sugar where some custom modules refused to appear in the Global Search settings, meaning I couldn't index them in ElasticSearch.

When I checked the module oddly enough unified search would be enabled:

modules//vardefs.php

1. Re-enable the module

To force it to be re-enabled update/create this file

custom/Extension/modules//Ext/Vardefs/vardefs.php

and add this setting.

$dictionary['<MODULE>']['unified_search'] = true;

2. Re-enable a field

You'll also need a field using the unified index before SugarCRM

custom/Extension/modules//Ext/Vardefs/sugarfield_name.php

Enable unfied_search as a setting.

$dictionary['<MODULE>']['fields']['name']['unified_search']=true;

After a quick repair/rebuild. My module appears in the Global Search Settings and I can poll it as normal through ElasticSearch.