---
title: "Create auto-complete functionality using suggestions blocks"
slug: "create-auto-complete-functionality-using-suggestions-blocks"
abstract: "Describes how to use the Sitecore Search to create a suggestions block for title suggestions."
---
# Create auto-complete functionality using suggestions blocks

You can create auto-complete functionality using suggestions blocks. Specifically, you can use the *Context aware* suggestions block algorithm to create auto-completion based on titles. This works by displaying content item titles that are close to the visitor's input in the Preview Search widget. This helps direct visitors to relevant content items before a search is performed.

> [!note]
> **Before you begin**
> -   [Enable the *title* attribute](https://doc.sitecore.com/search/en/users/search-user-guide/ai-driven-experiences/understand-suggestions-blocks/edit-an-attribute.html "Edit an attribute") for use with suggestions blocks, so that you can build suggestions using the titles of content items.

To create auto-complete functionality using a suggestions block:

1. On the menu bar, click **Administration** > **Domain Setting** > **Feature Configuration**.
2. Click the **Suggestions Blocks** card, then scroll to the bottom of the page and click **Add Suggestion Option**.

    A new suggestions block appears at the bottom of the page with placeholder text in the **Display name** and **Suggestion name** fields.

3. In the **Display name** field, delete the placeholder text and fill in a descriptive name such as *Title autocomplete*.

    Then, click the **Suggestion name** field, delete the placeholder text and fill in a lowercase version of the name with no spaces, such as *title_autocomplete*.

4. In the **Algorithm** field, click *Context aware*.
5. In the **Analyzers** field, click **Add Analyzer** and select [*Ngram Based Matching*](https://doc.sitecore.com/search/en/users/search-user-guide/optimize-keyword-searches/types-of-analyzers.html "Types of analyzers"). Then, click **Add Analyzer** again and select *Shingle Generator*.

    > [!note]
    > If your suggestion values are mostly single words, use the **Keyword** analyzer instead of the **Shingle Generator**.

6. Click the **Build Suggestions From** field and, in the drop-down menu, select *Title*.
7. In the **Grouping Analyzer** field, click *Shingle Generator*. Then, in the **Match Analyzer** field, click *Ngram Based Matching*.
8. Click **Save**, then click **Publish**. In the dialog that opens, confirm your changes by clicking **Publish** again.

    > [!important]
    > In the dialog, leave the **Reindex all sources after publishing domain settings** check box selected. Reindexing is necessary for the new suggestions block to be available for use.