Whatever the the reason may be for going down the path of updating Coveo for Sitecore, whether it be you've updated Sitecore or you've discovered a bug and the resolution is in a newer version; the steps to follow and the pitfalls you could run into are essentially the same.
It's important to know though which versions of Coveo for Sitecore are compatible with your version of Sitecore. Refer to this page for an up-to-date list of supported versions.
Do This First
Unless you just installed Coveo for Sitecore, it's quite likely you've customized it in some way. You should know that each new version, like a lot of software, has changes that some of your customizations may not be compatible with. So the first thing you'll want to do is take a snapshot of what you have, in the off-chance you want to revert.
Database Backup
Coveo installs into master and core databases so taking a backup of each of these is a good idea. This is especially the case if you've made changes to templates, renders or layout items.
Filesystem Backup
Do yourself a favour and take a backup of the wwwroot folder for website. If you're in Azure, ensure your backups are running. If that's not possible to do, ensure to take copies of the following folders at the very least:
/App_Config/Include/Coveo
- patches for computed fields, Sitecore username / password, index settings
/App_Config/Modules/Coveo
- default Coveo settings
/Coveo
- JavaScript, Hive result templates, etc
/Views/Coveo
- Coveo and Coveo Hive templates
If you have any computed fields or have any customized search design, the files should be located there and this way you'll at least be able to implement them again quickly once the update is complete. It's also useful to take note of the settings you were using, e.g. stoponerror
, indexpermissions
or the farm name you were using (p.s. use a farm name).
Disable Or Remove Old Configs
The last step in upgrading is disabling or removing the current configuration. You should do this immediately prior to when you are performing the update because once you do, obviously Coveo will not work. My preference is to remove the /App_Config/Modules/Coveo
and /App_Config/Include/Coveo
folders. This is also why I like to take a filesystem snapshot.
It's important for Coveo to not be running during the installation of another Coveo otherwise you can run into issues. What kind of issues you may ask? Well, for starters, you could experience the "never ending installation". You'll know this happens because it appears to take the package installation forever to finish. If this is happening, then the likelihood is a config file is still in use.
Performing The Update
Installing a newer version of Coveo for Sitecore is just like installing the original. Use the Installation Wizard to upload and install the new Coveo for Sitecore package.
When prompted whether you want to overwrite
, merge
or skip
, my recommendation is to use the overwrite
option. This ensures a clean Coveo update.
However, doing so will remove any custom layouts or renderings you've added that were stored within:
/Layouts/Layouts/Coveo
/Layouts/Layouts/Coveo Hive
/Layouts/Renderings/Coveo
/Layouts/Renderings/Coveo Hive
/Templates/Branches/Coveo Hive
/Templates/Coveo Hive
Post Installation
After the package has installed you will be prompted to enter in your Sitecore chosen username and password to use, and re-select the Coveo Cloud organization. You'll want to capture the apikey
and searchapikey
in the Coveo.CloudPlatformClient.Custom.config
file located within /App_Config/Include/Coveo
directory.
Merge Customizations
Once the complete, re-add your computed fields, custom pipelines, and additional settings you had by comparing the new files with your backed up file system content. You can do this with programs such as WinMerge. It's also a good time to revisit those settings in case they need to be updated.
Re-Index Sitecore
To ensure everything is in tip-top shape, rebuild your coveo_web_index
and coveo_master_index
indexes. Once done, review your search pages and you should be good to go.