Skip to content

Commit 04c246b

Browse files
Merge pull request #7042 from HeidiSteen/heidist-freshness
[azure search] suggesters clean up
2 parents b031df7 + 88b4bad commit 04c246b

File tree

3 files changed

+14
-27
lines changed

3 files changed

+14
-27
lines changed

articles/search/includes/quickstarts/semantic-ranker-rest.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,7 @@ To update an index using the REST API, you must provide the entire schema, plus
9999
{ "name": "id", "type": "Edm.String", "searchable": false, "filterable": false, "retrievable": false, "stored": true, "sortable": false, "facetable": false },
100100
{ "name": "rid", "type": "Edm.String", "searchable": false, "filterable": false, "retrievable": false, "stored": true, "sortable": false, "facetable": false }],
101101
"scoringProfiles": [],
102-
"suggesters": [
103-
{
104-
"name": "sg",
105-
"searchMode": "analyzingInfixMatching",
106-
"sourceFields": ["Address/City", "Address/Country", "Rooms/Type", "Rooms/Tags"]
107-
}
108-
],
102+
"suggesters": [],
109103
"analyzers": [],
110104
"normalizers": [],
111105
"tokenizers": [],

articles/search/index-add-scoring-profiles.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -340,13 +340,6 @@ The `boostGenre` profile uses weighted text fields, boosting matches found in al
340340
}
341341
]
342342
}
343-
],
344-
"suggesters": [
345-
{
346-
"name": "sg",
347-
"searchMode": "analyzingInfixMatching",
348-
"sourceFields": [ "albumTitle", "artistName" ]
349-
}
350-
]
343+
]
351344
}
352345
```

articles/search/index-add-suggesters.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: HeidiSteen
77
ms.author: heidist
88
ms.service: azure-ai-search
99
ms.topic: conceptual
10-
ms.date: 04/14/2025
10+
ms.date: 09/11/2025
1111
ms.update-cycle: 365-days
1212
ms.custom:
1313
- devx-track-csharp
@@ -21,9 +21,9 @@ In Azure AI Search, typeahead or "search-as-you-type" is enabled by using a *sug
2121

2222
Matches on partial terms can be either an autocompleted query or a suggested match. The same suggester supports both experiences.
2323

24-
## Typeahead experiences in Azure AI Search
24+
## Typeahead experiences
2525

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.
2727

2828
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.
2929

@@ -45,7 +45,7 @@ To create a suggester, add one to an [index definition](/rest/api/searchservice/
4545

4646
+ 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).
4747

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.
4949

5050
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).
5151

@@ -68,21 +68,21 @@ When evaluating analyzers, consider using the [Analyze Text API](/rest/api/searc
6868
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.
6969

7070
> [!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.
7272
7373
## Create using the Azure portal
7474

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**.
7676

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.
8282

8383
## Create using REST
8484

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).
8686

8787
```json
8888
{

0 commit comments

Comments
 (0)