You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/search/index-add-suggesters.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ author: HeidiSteen
7
7
ms.author: heidist
8
8
ms.service: azure-ai-search
9
9
ms.topic: conceptual
10
-
ms.date: 04/14/2025
10
+
ms.date: 09/11/2025
11
11
ms.update-cycle: 365-days
12
12
ms.custom:
13
13
- devx-track-csharp
@@ -21,9 +21,9 @@ In Azure AI Search, typeahead or "search-as-you-type" is enabled by using a *sug
21
21
22
22
Matches on partial terms can be either an autocompleted query or a suggested match. The same suggester supports both experiences.
23
23
24
-
## Typeahead experiences in Azure AI Search
24
+
## Typeahead experiences
25
25
26
-
Typeahead can be either *autocomplete*, which completes a partial input for a whole term query, or *suggestions* that invite click through to a particular match. Autocomplete produces a query. Suggestions produce a matching document.
26
+
Typeahead in Azure AI Search can be either *autocomplete*, which completes a partial input for a whole term query, or *suggestions* that invite click through to a particular match. Autocomplete produces a query. Suggestions produce a matching document.
27
27
28
28
The following screenshot illustrates both. Autocomplete anticipates a potential term, finishing *tw* with *in*. Suggestions are mini search results, where a field like `hotel name` represents a matching hotel search document from the index. For suggestions, you can surface any field that provides descriptive information.
29
29
@@ -45,7 +45,7 @@ To create a suggester, add one to an [index definition](/rest/api/searchservice/
45
45
46
46
+ If the string field is part of a complex type (for example, a City field within Address), include the parent in the field path: `"Address/City"` (REST, C#, and Python), or `["Address"]["City"]` (JavaScript).
47
47
48
-
+ Use the default standard Lucene analyzer (`"analyzer": null`) or a [language analyzer](index-add-language-analyzers.md) (for example, `"analyzer": "en.Microsoft"`) on the field.
48
+
+ Use the default standard Lucene analyzer (`"analyzer": null`) or a [language analyzer](index-add-language-analyzers.md) (for example, `"analyzer": "fr.microsoft"`) on the field.
49
49
50
50
If you try to create a suggester using preexisting fields, the API disallows it. Prefixes are generated during indexing, when partial terms in two or more character combinations are tokenized alongside whole terms. Given that existing fields are already tokenized, you have to rebuild the index if you want to add them to a suggester. For more information, see [Update or rebuild an index in Azure AI Search](search-howto-reindex.md).
51
51
@@ -68,21 +68,21 @@ When evaluating analyzers, consider using the [Analyze Text API](/rest/api/searc
68
68
Fields that use [custom analyzers](index-add-custom-analyzers.md) or [built-in analyzers](index-add-custom-analyzers.md#built-in-analyzers), (except for standard Lucene) are explicitly disallowed to prevent poor outcomes.
69
69
70
70
> [!NOTE]
71
-
> If you need to work around the analyzer constraint, for example if you need a keyword or ngram analyzer for certain query scenarios, you should use two separate fields for the same content. This allows one of the fields to have a suggester, while the other can be set up with a custom analyzer configuration.
71
+
> If you need to work around the analyzer constraint, for example if you need a keyword or ngram analyzer for certain query scenarios, you should use two separate fields for the same content. This allows one of the fields to have a suggester, while the other can be set up with a custom analyzer configuration. If you're using an indexer, you can map a source field to two different index fields to support multiple configuations.
72
72
73
73
## Create using the Azure portal
74
74
75
-
When using **Add Index** or the **Import data** wizard to create an index, you have the option of enabling a suggester:
75
+
In the Azure portal, you can specify a suggester when you select **Add index**.
76
76
77
-
1.In the index definition, enter a name for the suggester.
78
-
79
-
1.In each field definition for new fields, select a checkbox in the **Suggester** column. A checkbox is available on string fields only.
80
-
81
-
As previously noted, analyzer choice impacts tokenization and prefixing. Consider the entire field definition when enabling suggesters.
77
+
1.Select **Add index** and add a string field.
78
+
1. Set field attribution to **Searchable**.
79
+
1.Select an analyzer.
80
+
1. Once fields are defined, select **Autocomplete settings**.
81
+
1. Select the searchable string fields for which you want to enable an autocomplete experience.
82
82
83
83
## Create using REST
84
84
85
-
In the REST API, add suggesters by using [Create Index](/rest/api/searchservice/indexes/create) or [Update Index](/rest/api/searchservice/indexes/create-or-update).
85
+
In the REST API, add suggesters by using [Create Index](/rest/api/searchservice/indexes/create).
0 commit comments