Up and Running Quickly with Coveo for Sitecore Cloud

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. CoveoHiveSearchPage

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.

  1. Once installed the Welcome Screen provides some helpful links about the installation process Click Next.
  2. 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.coveosignin
  3. 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.createorganisation
    • 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.
  4. 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.
  5. 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.coveoinstallbodyindexingoptions
    • 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.
  6. 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.
  7.  Activate Coveo For Sitecore
    • To complete the installation you must rename a few configuration files by removing the .example extension on the following files:
      Coveo.CloudPlatformClient.Custom.config.example
      Coveo.SearchProvider.config.example
      Coveo.SearchProvider.Custom.config.example
      Coveo.SearchProvider.Rest.config.example
      Coveo.SearchProvider.Rest.Custom.config.example
      Coveo.UI.Controls.config.example
      Coveo.UI.Components.ExperienceEditor.config.example
    • 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\
  8. Success
    • 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.
  9. 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.
  10. 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:

coveoadminfeatures

  • 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.

Diagnostics Page

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.

CoveoforSitecoreDiagnosticsPage

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.

  1. 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.
  2. Search – optimize search results relevance and search experience in general, and manage hosted search pages.
  3. Analytics – monitor and measure the usage of the Coveo search.
  4. Organization – manage the organization accesses (groups, members, and API keys) and review the activity inside the organization.

CoveoAdminConsole

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.

CoveoAdminConsoleContent

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.

  1. Speed
    • Legacy UI uses the Javascript Search Framework V1, which downloads the whole code of a page every time. Hive works with the Javascript Search Framework V2, which uses lazy loading, so it only downloads the code related to the components you have added to your search page. Greatly improving page load speed.
    • 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.
  2. 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.

    1. Log into Sitecore Content Editor
    2. In the tree on the left, select the parent item to put your search page, and right-click it.
    3. Select Insert > Insert from template.
    4. In the Insert from Template window, select Branches > Coveo Hive > Example Search Page, and select Insert.CoveoBranchTemplate

 

  1. 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.CoveoHiveSearchPage1

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:

  • Autocomplete
  • Facets
  • 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 Folder

  • 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.

ExperienceAnalyticsCoveo Folder

  • Coveo.Analytics.xDB.config – defines the Coveo components related to Sitecore xDB.

ExperienceProfileCoveo Folder

  • 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.

Additional Resources

That’s all folks!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s