THIS IS ARCHIVED DOCUMENTATION

Result Suggestions Using the Coveo for Sitecore Legacy Search UI Framework

Coveo for Sitecore 4.1 (November 2018)

Result Suggestions will send a query after every keystroke. Hence, it’s the most demanding feature in terms of query consumption.

Search results can be displayed as the user types in the Coveo Search Box. To simplify the configuration of those search results, Coveo provides components that can be added to search boxes.

This component suggests results directly in the Omnibox. Clicking one of the suggestions directly opens the item.

You can add this component to both the full search interface and the standalone search box.

Search Interface (Coveo Search/Coveo Search View)

Prerequisites

Instructions

  1. Locate the element with the CoveoSearchInterface class in the ascx file (Web Forms) or the cshtml file (MVC) of your Coveo Search component copy.

  2. Add the following element anywhere between the opening <div> tag and the closing </div> tag of that element:

     <div class="CoveoOmniboxResultList">
         <script class="result-template" type="text/x-underscore-template">
             <div>
                 <a href="" class="title open-link"></a>
             </div>
         </script>
     </div>
    
  3. Save the file.

Standalone Search Box (Coveo Search Box/Coveo Search Box View)

Prerequisites

  • You need to use the Coveo Search Resources component (Web Forms) or the Coveo Search View Resources component (MVC), not the Coveo Search Box Resources component (Web Forms) or the Coveo Search Box View Resources component (MVC).

Instructions

  1. In the Experience Editor in Edit mode, once a Coveo Search Box component has been added to your page, you should see a Sitecore placeholder located under the search box.

  2. Click Add components.

  3. Click Add here.

  4. Select the CoveoOmnibox Result List component.

  5. Save the item.

After adding a Coveo Omnibox Result List to your Coveo Search Box, the name of the component should appear under the search box. This name is only visible in edit mode.

The Coveo Omnibox Result List will display search results as the user types. It’s, in fact, a result list that renders itself inside the Coveo JavaScript Search Framework Omnibox.

It’s possible to edit the properties of this component to fit your needs (see Omnibox Result List Component Properties).