I have SuiteCRM Version 7.12.2 installed along with Elasticsearch Version 7.17.4. Initially, everything was functioning correctly, but about a month ago, the Elasticsearch feature stopped working. There was no PHP upgrade as well. Although I am able to manually perform partial and full indexing without any issues, newly created or updated records are not indexed and do not appear in search results. The strange thing is that the records start appearing in global search results only after I perform a quick repair and rebuild. There are no error messages in either SuiteCRM or PHP error logs related to Elasticsearch. I would appreciate any help in identifying and resolving this issue.
Maybe itβs this issue
opened 03:04PM - 02 Jun 22 UTC
Type:Bug
Priority:Important
Area: Upgrading
Area: Elasticsearch
Hacktoberfest
<!--- Please be aware that as of the 31st January 2022 we no longer support 7.10β¦ .x.
New issues referring to 7.10.x will only be valid if applicable to 7.12.x and above.
If your issue is still applicable in 7.12.x, please create the issue following the template below -->
#### Issue
When upgrading from, for example, 7.10.18 to 7.12.5, elastic search after_save and after_delete logic hooks are not added to the custom/modules/logic_hooks.php file, as they would be on a fresh install of suite 7.12.5.
#### Expected Behavior
The upgrade should include the logic hooks so when elastic search is enabled, saving a change to an indexed module will trigger a reindex.
#### Actual Behavior
Only the scheduled task or robo commands will reindex changes.
#### Possible Fix
Possibly add the install_es(install/suite_install/suite_install.php) or installESHooks(install/suite_install/Search.php) functions into the upgrade packages of suite versions before elastic search was added. Not sure how this is done with upgrade packages.
https://github.com/salesagility/SuiteCRM/commit/51933421f74eb06598185bb742d6d6f42d2e257d link to the commit for installing the hooks
#### Steps to Reproduce
1.Start with a Suite v7.10.18 install
2.Use the upgrade wizard to upgrade to 7.12.5
3.build an elastic search server and enable elastic search in SuiteCRM, run a full index.
4.Ensure the elastic search scheduled task is not active so it does not run before step 5
5.Make a change to a record in any module and attempt to search for that change. The change should not appear in search results
#### Context
Upgrades from older Suite versions(pre elastic search) are not including the logic hooks so elastic search full functionality is not available.
#### Your Environment
* SuiteCRM Version used: 7.10.18
* Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): Firefox v100.0.2
* Environment name and version (e.g. MySQL, PHP 7):PHP 7.4
* Operating System and version (e.g Ubuntu 16.04): Ubuntu 20.04.4 LTS
The absence of logic hooks would explain a missing functionality (with zero log messages).