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

Shane Dowling
Sep 18, 2014 · 1 min read
Image for post
Image for post

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/<MODULE>/vardefs.php

1. Re-enable the module

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

custom/Extension/modules/<MODULE>/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/<MODULE>/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.

Tech Blog

Random smattering of technical posts

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store