---
title: Coveo Query Suggest Preview
slug: '3232'
canonical_url: https://docs.coveo.com/en/3232/
collection: coveo-for-sitecore-v5
source_format: adoc
---
# Coveo Query Suggest Preview

> **Legacy feature**
>
> The Coveo Hive Framework is now in maintenance mode and is no longer recommended for new implementations.
>
> To build new search experiences, use one of Coveo's more modern, lightweight, and responsive libraries.
> To get started, see the [Build search](https://docs.coveo.com/en/2473.md) article.

[Available since Coveo for Sitecore 5.0.655.1]

Implements the [Coveo JavaScript Search Framework](https://docs.coveo.com/en/187.md) [QuerySuggestPreview](https://coveo.github.io/search-ui/components/querysuggestpreview.html) component which renders previews of the top query results matching the currently focused [Coveo Machine Learning](https://docs.coveo.com/en/188.md)-powered [query suggestions](https://docs.coveo.com/en/1015.md).

## Usage notes

* To use the **{doctitle}** rendering, you first need to enable Query Suggestions in your search interface, which involves creating a machine learning model and feeding it analytics data (see [Enabling query suggestions](https://docs.coveo.com/en/2797.md#enabling-query-suggestions)).

* In the **{doctitle}** rendering data source, select a result template that has been inserted in the current search page.

* You can [customize the CSS](https://docs.coveo.com/en/2342.md) associated with this rendering.

## Insertion location

+
<div>
<h3>Coveo Hive</h3>
  
The **Coveo Query Suggest Preview** rendering is an Allowed Control in the following placeholder(s): `Searchbox Components`

  <video width="690" height="335" controls="">
  <source src="https://docs.coveo.com/en/assets/images/c4sc-v5/query-suggest-preview-hive.mp4" type="video/mp4" />
  Your browser doesn't support the video tag.
</video>
  <div class="figure-caption">Example insertion sequence for the **Coveo Query Suggest Preview** rendering.
  </div>
</div>
<div>
<h3>Coveo Hive SXA</h3>
  
When you add the **Coveo Searchbox** SXA rendering, this adds a `coveouisearchboxcomponentssxa` placeholder. Insert your **Coveo Query Suggest Preview** rendering in this `coveouisearchboxcomponentssxa` placeholder.

  <video width="690" height="335" controls="">
  <source src="https://docs.coveo.com/en/assets/images/c4sc-v5/query-suggest-preview-sxa.mp4" type="video/mp4" />
  Your browser doesn't support the video tag.
</video>
  <div class="figure-caption">Example insertion sequence for the **Coveo Query Suggest Preview** rendering.
  </div>
</div>
+

## Data source options

The following table lists the available data source options for this rendering.

| Option name | Description |
|---|---|
| Execute query delay | See the [executeQueryDelay](https://coveo.github.io/search-ui/components/querysuggestpreview.html#options.executequerydelay) component option. |
| Number of preview results | See the [numberOfPreviewResults](https://coveo.github.io/search-ui/components/querysuggestpreview.html#options.numberofpreviewresults) component option. |
| Result template | Allows selecting a result template, present in the current page, from a list of **Coveo File Result Template** and **Coveo Item Result Template** data source item names (see the [resultTemplate](https://coveo.github.io/search-ui/components/querysuggestpreview.html#options.resulttemplate) component option). |
| DOM unique ID | {empty} -- Randomly generated HTML element ID. -- |
| Additional data attributes | {empty} -- Allows [use of the Coveo JavaScript Search Framework **QuerySuggestPreview** component options](https://docs.coveo.com/en/2776.md) that aren't directly available in the data source. -- |

## Sample generated HTML and corresponding visual output

```html
<div id="coveo405cec6f" class="CoveoQuerySuggestPreview" data-execute-query-delay="10"
data-number-of-preview-results="4" data-prebind-result-template-selector="itemIdSelector"
data-result-template-selector="#coveo7251E2B7" data-applied-prebind="true">
</div>
```

![Query Suggest Preview Animation | Coveo for Sitecore 5](https://docs.coveo.com/en/assets/images/c4sc-v5/query-suggest-preview-animation.gif)