Coveo for Sitecore - Hive Framework

Last October, months before I started this blog, I gave a presentation at my local Sitecore User Group showcasing the new Coveo for Sitecore Hive Framework. This post is a summary of that presentation.

Today's web users expect relevant content and a tailored search experience. They want a robust search solution incorporated into the website. They also want it to be dynamic and easy to use. Ideally, it would even integrate easily with Sitecore. Welcome to Coveo for Sitecore.

What is Coveo?

Coveo is a relevance engine that allows you to easily build dynamic search pages. It utilizes machine learning for automated relevance tuning and query autosuggestions. It also comes with a robust set of analytics tools and, to top it off, is very easy to install.

Relatively recently, Coveo eveloped a new Sitecore framework called "Hive". Compared with the legacy way of setting up a page, Coveo Hive breaks up a Coveo search page into separate components, making it easier to move elements around and even make them cacheable using Sitecore's built-in caching.

How does it work?

From a high level, the way Coveo works is, you give it a bunch of Sitecore data, it stores that data in an index and serves it back to you based on your search query. Sprinkled in there is some machine-learned "massaging" of the search results in order to make them as relevant as possible. Certain results are boosted or buried based on how relevant previous users have found them to be, so that as more people use the search page, the results get more and more relevant.

How can I get Coveo on my Sitecore site?

Coveo can run in two ways, it can be installed on your server (on-premise) or it can run on Coveo's cloud servers. However, Coveo Hive can only be installed using Coveo's cloud servers, limiting the on-premise installation to the Coveo legacy framework. Since I'm most familiar with Coveo Hive, I can only speak to that, but I will say that the Coveo cloud-based installation is extremely simple. To begin, you sign up for a Coveo account on their website. Then, you download an install a Sitecore package. A wizard guides you through the package installation and helps you configure everything necessary to get Coveo to work.

Once the installation is complete, it's only a matter of creating a new Sitecore page, adding all of the necessary renderings and datasources and building a Coveo index. In the end, you will have yourself a working Coveo search page.

Indexing

By default, Coveo indexes the entire Sitecore content tree, but is easily configurable to allow you to select a root node from where to begin building the Coveo index. The Coveo index is run from Sitecore's indexing manager. During the Coveo installation, a new index is created for each of your Sitecore DBs (usually just master & web).

When Coveo indexes your Sitecore items, all fields are indexed unless specifically excluded. Most fields are stored as strings, but you can modify the type of data stored to be: Int32, Int64, Decimal and Date. The data from the Sitecore fields are what you have access to when you render the search results. For times when you want to store or manipulation information based off of what is stored in Sitecore, you have the option to create new "Computed Fields", which are also stored in the Coveo index underneath its parent result item.

Components

Coveo Hive comes with many powerful out of the box components: Facets, Filters, Sorts, Pagers, Dynamic Search Bars, etc. You can even create custom components or extend existing components that interact with Coveo's Javascript Search Framework. Coveo exposes several events during the Query Lifecycle, as well as events that have to do with your interaction with the Coveo page. Utilizing these events, you can piggyback your own functionality to modify or expand the functionality of these components.Coveo Query Lifcycle

Result Template

Coveo allows you to customize the way that the search results look by creating new result templates. These are .NET razor files that are rendered for a given search result. You will usually have one result template per Sitecore item that you are showing on a search page. Within the result template is where you decide with Coveo indexed fields you will display.

Coveo Cloud Portal

If you are hosting your Coveo index in the cloud, you will be able to monitor your data, as well as look at analytics reports, in the Coveo Cloud Portal. The Coveo Portal is an web-based admin page that is very intuitive and easy to use. Coveo really does make things simple.

So the takeaway from all of this is that Coveo for Sitecore is super easy to get started with and can really enhance the search experience of your users. I was a little intimidated by it at first, but now that I have been working with it for about a year, I can say that it has a simple learning curve and pretty easy to jump right into. If you've fairly familiar with how Sitecore works, then integrating Coveo into your Sitecore site will be a breeze.

Add comment