---
title: "Create typo correction using a suggestions block"
slug: "create-typo-correction-using-a-suggestions-block"
abstract: "Describes how to create typo correction functionality in Sitecore Search using an edit distance suggestions block."
---
# Create typo correction using a suggestions block

To create typo correction functionality, use suggestions blocks. In particular, employ the *edit distance* algorithm in the suggestions block to assist in correcting typos or near-miss keywords. This displays keywords closely resembling the visitor's input in the preview search widget.

> [!note]
> **Before you begin**
> -   [Enable the *keywords* 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 suggestion blocks.

To create typo correction using a suggestions block:

1. On the menu bar, click **Administration** > **Domain Settings** > **Feature Configuration**.
2. Click the **Suggestions Blocks** card, then scroll to the bottom of the page and click ![Plus_add__grey.png](https://doc.sitecore.com/api/markdown-image/search/en/users/search-user-guide/images/Plus_add__grey.png) **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 enter a descriptive name such as *Keyword typo*.

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

4. In the **Algorithm** field, click *Edit distance*.
5. In the **Analyzers** field, click **Add Analyzer** and select *Shingle Generator*. Then, click **Add Analyzer** again and select *Lowercase*.
6. Click the **Build Suggestions From** field and, in the drop-down menu, click *Keywords*.
7. In the **Grouping Analyzer** field, click *Shingle Generator*. Then, in the **Match Analyzer** field, click *Lowercase*.
8. Click **Save**, then click **Publish**. This opens a dialog box. Confirm your changes by clicking **Publish** again in the dialog box.

    > [!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.