In this post, I’ll run through how you can get up and running quickly and easily with Coveo For Sitecore v4.1 Cloud Edition using Sitecore 8.2 update 5 as it is fully supported by Coveo. Coveo is planning to support Sitecore 9 in their next release, expected for release at the end of January – so keep an eye out for that. I’ll also take a quick peek at the Hive framework and provide some pointers on useful information and where you can go for additional help.
Coveo For Sitecore Package Installation
Starting with a vanilla instance of Sitecore 8.2 update 5 I’ve gone to the Coveo For Sitecore developer downloads and grabbed the Coveo version corresponding to my version of Sitecore: Coveo for Sitecore 82 4.1 (184.19).zip.
This is a standard Sitecore installation package that will start the Coveo for Sitecore Configuration Wizard once installed – it takes a few minutes to install.
- Once installed the Welcome Screen provides some helpful links about the installation process Click Next.
- When you get to the Log into or Create you Cloud Organization window,
- Click Sign-Up or Log Into Coveo Cloud.
- Follow the instructions to authorize your Sitecore instance to interact with Coveo. I use google to authenticate my local developer instances.
- On the Coveo Cloud Organization screen:
- If you already have a Cloud Organization created for your project you can select it or you can create a new Organization. It is recommended that you use a new organization for every new Sitecore project.
- I’ll create a New Organization and call it: sc82u5 the same as my Sitecore instance.
- Choose Cloud Edition Trial and hit Next.
- The Trial Edition provides 30 days at end of which your data will be deleted from the Cloud. You can rebuild the indexes and continue developing, however, any analytics data you were working with will be lost.
- In the Configure the Sitecore credentials used to retrieve security permissions screen.
- Enter the Sitecore account details of the Sitecore account to use to retrieve security permissions of indexed items.
- The password entered on this screen is encrypted and saved in the Coveo.SearchProvider.Custom.config.example file.
- An encryption key is automatically created in the core database of your Sitecore instance.
- Configure Body indexing options screen.
- Select the type of body indexing that you prefer for your Sitecore items.
- To index the full HTML rendering of the published Sitecore items, choose Index rendered HTML
- To index only Sitecore item data, select Only index Sitecore item data.
- and click Next.
- You can read more about the Indexing Items with HTML Content Processor and also how to ignore sections of HTML content from being indexed like the header and footer.
- Configure Document Security.
- Coveo usually indexes Sitecore permissions individually on each item. You can however, choose to disable the indexing of these permissions so all items are indexed as Anonymous. This may result in a performance increase.
- I don’t need permissions enabled
- This step will configure the Coveo.SearchProvider.Custom.config.example file by updating the node and can be changed later.
- Activate Coveo For Sitecore
- To complete the installation you must rename a few configuration files by removing the .example extension on the following files:
- You can allow Coveo to do this automatically or you must do it yourself manually. These files are located in C:\inetpub\wwwroot\[instancename]\Website\App_Config\Include\Coveo\
- To complete the installation you must rename a few configuration files by removing the .example extension on the following files:
- If all has gone well you will see the Coveo for Sitecore successfully installed. It usually takes 15-30 minutes to provision your Coveo Trial Cloud index.
- Publish Content
- You now need to publish items that just got installed, as I started with a vanilla Sitecore instance I’ve published the entire site.
- Rebuild Indexes
- Coveo creates two additional indexes you can see these listed in the in Sitecore Indexing Manager: Coveo_master_index & Coveo_web_index
- You need to rebuild these using the Sitecore Indexing Manager.
Coveo Search Admin Features
If you access the Sitecore Control panel you see new options for Coveo:
- Actions – Allows you to perform various maintenance actions.
- Cloud Administration Console – Links to your organizations Cloud administration.
- Configuration – allows you to configure the Cloud Organization, Farm Name & Sitecore Credentials used to retrieve security credentials.
- Diagnostics Page – is useful for troubleshooting Coveo for Sitecore.
- Developer & Support resources.
- License details – shows you which version you are using and the remaining days you have available.
Let’s take a brief look at the Diagnostics Page. This allows you to verify that Coveo For Sitecore installed successfully and you are able to index items to the Coveo Cloud. If you run into any issues with Coveo this should be your first place to check as it will provide you with valuable information on any issues pertaining to Coveo modules. You can also download a diagnostics package that contains information that can help Coveo support diagnose issues with your Coveo for Sitecore instance when creating Coveo support tickets.
- Components state – lists all the major modules and their status. If all of these are green Up and running state then Coveo was installed successfully and is running as expected. If there is a problem with any of these modules then an error message will appear in the state detailing the issue to help you to try and diagnose the issue.
- Version Information – displays the Coveo and Sitecore version and the compatibility status of both.
- Organization information – Displays the name and id of the organization created step 3 of the installation.
- Configuration files – Lists all the current configuration files associated with Coveo.
- Published Item – indicates the publish status of the installed Coveo items.
- Indexing Test – allows you to test indexing of an item to the Coveo Cloud index
- Choose the index: Coveo_master_index or Coveo_web_index
- Enter the path of the item and Click Index
- The results of the item index is displayed and log is updated
- Log Viewer – allows you to select a Coveo log from available logs and view on the screen.
- Indexes List – displays all indexes and indicates which indexes are Coveo indexes.
Coveo Cloud Administration Console
The console provides a number features that allows you to manage your Coveo Cloud Organization and divided into 4 sections navigatable in the left-hand panel. Each section is broken up further into specific tasks you can perform if you have the appropriate permissions. If you have multiple organizations you can switch to another organization using the drop-down in the header.
- Content – add content to the organization, manage scripts to customize the way source items are included, browse content and review security identity providers that secure your content.
- Search – optimize search results relevance and search experience in general, and manage hosted search pages.
- Analytics – monitor and measure the usage of the Coveo search.
- Organization – manage the organization accesses (groups, members, and API keys) and review the activity inside the organization.
You can see the two Sitecore indexes: Coveo_master_index & Coveo_web_index that I rebuilt in step 10 above are listed on the Source tab in the Content section.
If you click on the Content Browser tab you can easily view and search for content in our indexes to ensure content has been indexed as expected.
Coveo Hive Framework
Coveo introduced the Hive framework in Coveo For Sitecore v4.1. It is a new MVC only UI framework where the search interface is split up into numerous components whereas the previous version known as Legacy UI is a more basic framework made up of one large component, the search interface itself supported WebForms and MVC. However, for backward compatibility, both versions are included in Coveo For Sitecore v4.1.
Coveo for Sitecore Hive differs from the Legacy UI in terms of download speed and layout flexibility.
- Legacy UI, no components are cacheable because the search interface is formatted as one large component, which depends on non-cacheable elements, such user context. With Hive, only a few components are not cacheable, since they depend on Sitecore and the current context.
This allows the other components to be put in a cache and use the values provided by the contextual components.
- Layout Flexibility
- Legacy UI all features are controlled by properties on the main Coveo Search component. If you wanted to move components around on your search interface, you need to modify the code. With Hive, all features are separate components and are configured separately. It takes more time to build your search page but allows for more flexibility when it comes to modifying features. Instead of opening the code, you simply use the Experience Editor to modify whatever needs to be changed.
If you are new to Hive, Simon Langevin has written a great blog explaining what the Hive is – I encourage you to go have a read. You can find information on all the various Coveo Hive Components from their reference guide. Also, check out Coveo for Sitecore Hive Getting Started Tutorial.
Create a Sample Search Page with Hive
Now let’s create a search page on my Sitecore instance. For speed in I’m going to cheat and use the Branch template Coveo provides OOTB to create a search page using the Hive framework.
- Log into Sitecore Content Editor
- In the tree on the left, select the parent item to put your search page, and right-click it.
- Select Insert > Insert from template.
- In the Insert from Template window, select Branches > Coveo Hive > Example Search Page, and select Insert.
- You can preview in experience editor as standard. I’ve gone ahead and published the page so you can see what it looks like on the website.
As you can see it took no time at all from installing Coveo For Sitecore Cloud edition to adding a Search page on my site that is working and pulling search results from my Coveo Cloud index with some pretty awesome features provided OOTB to name a few:
- Sorting & Paging
- List & Card view
- Quick View
I’m sure the requirements for your specific search page won’t look exactly like this but it serves as a good starting point to help you understand how to construct a search page using the Coveo Hive components.
What is going on under the hood?
So in this post, I have run through a couple of different scenarios indexing content, using a search page to search for content etc it is useful if you have an understanding of what going on under the hood. Coveo, have put together a good document: Understanding the Architecture of Coveo for Sitecore – Cloud with some pretty workflow diagrams to help show the various components and how they interact when the following Scenarios occur:
- Scenario 1 – Rebuilding Your Search Indexes.
- Scenario 2 – Performing a Query from the Content Editor.
- Scenario 3 – Performing a Query from a Coveo Search Page.
This should help you learn about different parts of Coveo and how they interact with each other and should you need to troubleshoot Coveo will prove to be valuable.
Coveo For Sitecore Configuration Files
Coveo installed a number of Configuration files you might be wondering where these are and what they are for as you may need to make some changes or if you would like to make changes to any of the settings you specified during the install. The Coveo configuration is located in one to three folders:
- [sitecore instance]\Website\App_Config\Include\Coveo
- [sitecore instance]\Website\App_Config\Include\ExperienceAnalyticsCoveo
- [sitecore instance]\Website\App_Config\Include\ExperienceProfileCoveo
The .config files contain the out-of-the-box configurations of Coveo for Sitecore.
The .custom.config files contain configuration examples and the configurations generated by Coveo UIs (e.g.: the post-installation wizard).
- Coveo.CloudPlatformClient.config – contains the configuration of the module responsible for interacting with the Coveo Cloud platform.
- Coveo.CloudPlatformClient.Custom.config – contains the custom configuration of the module responsible for interacting with the Coveo Cloud platform.
- Coveo.SearchProvider.config – contains the Coveo indexes definitions and the default configuration of the Coveo Search Provider. No modification should be done to this file.
- Coveo.SearchProvider.Custom.config – contains the custom configuration of the Coveo Search Provider and pipeline examples. This file is meant to be modified.
- Coveo.SearchProvider.Licensing.config – contains the different commands used to open Coveo wizards.
- Coveo.SearchProvider.Rest.config – contains the configuration of the REST endpoint used to query the Coveo index. It also includes configurations related to search results handling. No modification should be done to this file.
- Coveo.SearchProvider.Rest.Custom.config – contains the custom configuration of the REST endpoint and pipeline examples. This file is meant to be modified.
- Coveo.UI.Controls.config – this file is responsible for the configuration related to the integration of Coveo JS Framework in the Sitecore page editor.
- SwitchMasterToWeb.Coveo.config.example – useful when configuring Sitecore in a CM/CD configuration. Activate only on CD instances.
- Coveo.Analytics.xDB.config – defines the Coveo components related to Sitecore xDB.
- Coveo.ExperienceProfile.config – defines the Coveo for Sitecore processors to report Coveo search page events to Sitecore xDB.
Where to go for help
The following resources are available for getting you Coveo related questions answered:
- Coveo Knowledge Base – here you will find articles on tips, tricks, and various Coveo topics from their team of Product Specialists.
- Sitecore Stack Exchange – this is where are all the awesome Sitecore people are hanging out these days to answers your Sitecore related queries.
- Sitecore Slack Community – has a dedicated Coveo Channel.
- Coveo Support – if you can’t find the answer on their knowledge base or in the community then as a Coveo Customer or Partner you can create a user account with support and raise support cases.
- Coveo For Sitecore Installation Guide
- Coveo For Sitecore v4 Release Notes
- How to install Coveo For Sitecore Package (YouTube)
- Understanding the Coveo Search Provider’s Configuration File
- Understanding Organisation Provisioning
- Introduction to Coveo Configuration Files
- Coveo for Sitecore Hive: What is It?
- Introduction to the Coveo Hive Framework Part 1 (YouTube)
- Introduction to the Coveo Hive Framework Part 2 (YouTube)
- Best Practices when deploying Coveo for Sitecore Cloud
That’s all folks!!