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
This article explains how to set up *output field mappings* that determine a data path between in-memory data structures created during skill processing, and target fields in a search index. An output field mapping is defined in an [indexer](search-indexer-overview.md) and has the following elements:
18
+
This article explains how to set up *output field mappings*, defining a data path between in-memory data structures created during [skillset processing](cognitive-search-concept-intro.md), and target fields in a search index. An output field mapping is defined in an [indexer](search-indexer-overview.md) and has the following elements:
19
19
20
20
```json
21
21
"outputFieldMappings": [
@@ -27,7 +27,7 @@ This article explains how to set up *output field mappings* that determine a dat
27
27
],
28
28
```
29
29
30
-
In contrast with a [`fieldMappings`](search-indexer-field-mappings.md) definition that maps a path between two physical data structures, an `outputFieldMappings` definition maps in-memory data to fields in a search index.
30
+
In contrast with a [`fieldMappings`](search-indexer-field-mappings.md) definition that maps a path between two physical data structures, an `outputFieldMappings` definition maps in-memory enrichments to fields in a search index.
31
31
32
32
Output field mappings are required if your indexer has an attached [skillset](cognitive-search-working-with-skillsets.md) that creates new information, such as text translation or key phrase extraction. During indexer execution, AI-generated information exists in memory only. To persist this information in a search index, you'll need to tell the indexer where to send the data.
33
33
@@ -37,7 +37,7 @@ Output field mappings apply to:
37
37
38
38
+ In-memory content that's created by skills or extracted by an indexer. The source field is a node in an enriched document tree.
39
39
40
-
+ Search indexes. If you're populating a [knowledge store](knowledge-store-concept-intro.md), use [projections](knowledge-store-projections-examples.md) for data path configuration.
40
+
+ Search indexes. If you're populating a [knowledge store](knowledge-store-concept-intro.md), use [projections](knowledge-store-projections-examples.md) for data path configuration. If you're populating a vector store, output field mappings aren't used.
41
41
42
42
Output field mappings are applied after [skillset execution](cognitive-search-working-with-skillsets.md) or after document cracking if there's no associated skillset.
43
43
@@ -60,7 +60,7 @@ Output field mappings are added to the `outputFieldMappings` array in an indexer
60
60
|----------|-------------|
61
61
| sourceFieldName | Required. Specifies a path to enriched content. An example might be `/document/content`. See [Reference enrichments in an Azure AI Search skillset](cognitive-search-concept-annotations-syntax.md) for path syntax and examples. |
62
62
| targetFieldName | Optional. Specifies the search field that receives the enriched content. Target fields must be top-level simple fields or collections. It can't be a path to a subfield in a complex type. If you want to retrieve specific nodes in a complex structure, you can [flatten individual nodes](#flattening-information-from-complex-types) in memory, and then send the output to a string collection in your index. |
63
-
| mappingFunction | Optional. Adds extra processing provided by [mapping functions](search-indexer-field-mappings.md#mappingFunctions) supported by indexers. In the case of enrichment nodes, encoding and decoding are the most commonly used functions. |
63
+
| mappingFunction | Optional. Adds extra processing provided by [mapping functions](search-indexer-field-mappings.md#mappingFunctions) supported by indexers. For enrichment nodes, encoding and decoding are the most commonly used functions. |
64
64
65
65
You can use the REST API or an Azure SDK to define output field mappings.
66
66
@@ -103,7 +103,7 @@ api-key: [admin key]
103
103
}
104
104
```
105
105
106
-
For each output field mapping, set the location of the data in the enriched document tree (sourceFieldName), and the name of the field as referenced in the index (targetFieldName). Assign any [mapping functions](search-indexer-field-mappings.md#mappingFunctions)that you require to transform the content of a field before it's stored in the index.
106
+
For each output field mapping, set the location of the data in the enriched document tree (sourceFieldName), and the name of the field as referenced in the index (targetFieldName). Assign any [mapping functions](search-indexer-field-mappings.md#mappingFunctions)needed to transform the content of a field before it's stored in the index.
107
107
108
108
### [**.NET SDK (C#)**](#tab/csharp)
109
109
@@ -129,7 +129,6 @@ SearchIndexer indexer = new SearchIndexer(
Copy file name to clipboardExpand all lines: articles/search/search-how-to-alias.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ ms.service: cognitive-search
8
8
ms.custom:
9
9
- ignite-2023
10
10
ms.topic: how-to
11
-
ms.date: 04/04/2023
11
+
ms.date: 01/18/2024
12
12
---
13
13
14
14
# Create an index alias in Azure AI Search
@@ -37,7 +37,7 @@ You can create an alias using the preview REST API, the preview SDKs, or through
37
37
You can use the [Create or Update Alias (REST preview)](/rest/api/searchservice/preview-api/create-or-update-alias) to create an index alias.
38
38
39
39
```http
40
-
POST /aliases?api-version=2021-04-30-preview
40
+
POST /aliases?api-version=2023-10-01-preview
41
41
{
42
42
"name": "my-alias",
43
43
"indexes": ["hotel-samples-index"]
@@ -58,7 +58,7 @@ Follow the steps below to create an index alias in the Azure portal.
58
58
### [**.NET SDK**](#tab/sdk)
59
59
60
60
61
-
In the preview [.NET SDK](https://www.nuget.org/packages/Azure.Search.Documents/11.5.0-beta.5) for Azure AI Search, you can use the following syntax to create an index alias.
61
+
Using one of the beta packages from the [Azure SDK for .NET](https://www.nuget.org/packages/Azure.Search.Documents/), you can use the following syntax to create an index alias.
62
62
63
63
```csharp
64
64
// Create a SearchIndexClient
@@ -69,7 +69,7 @@ SearchAlias myAlias = new SearchAlias("my-alias", "hotel-quickstart-index");
69
69
adminClient.CreateAlias(myAlias);
70
70
```
71
71
72
-
Index aliases are also supported in the latest preview SDKs for [Java](https://search.maven.org/artifact/com.azure/azure-search-documents/11.6.0-beta.1/jar), [Python](https://pypi.org/project/azure-search-documents/11.4.0b1/), and [JavaScript](https://www.npmjs.com/package/@azure/search-documents/v/11.3.0-beta.8).
72
+
Index aliases are also supported in the latest preview SDKs for [Java](https://central.sonatype.com/artifact/com.azure/azure-search-documents/versions), [Python](https://pypi.org/project/azure-search-documents/#history), and [JavaScript](https://www.npmjs.com/package/@azure/search-documents?activeTab=versions).
73
73
74
74
---
75
75
@@ -80,7 +80,7 @@ Once you've created your alias, you're ready to start using it. Aliases can be u
80
80
In the query below, instead of sending the request to `hotel-samples-index`, you can instead send the request to `my-alias` and it will be routed accordingly.
81
81
82
82
```http
83
-
POST /indexes/my-alias/docs/search?api-version=2021-04-30-preview
83
+
POST /indexes/my-alias/docs/search?api-version=2023-10-01-preview
84
84
{
85
85
"search": "pool spa +airport",
86
86
"searchMode": any,
@@ -102,12 +102,13 @@ If you expect to make updates to a production index, specify an alias rather tha
102
102
Now, whenever you need to update your application to point to a new index, all you need to do is update the mapping in your alias. PUT is required for updates as described in [Create or Update Alias (REST preview)](/rest/api/searchservice/preview-api/create-or-update-alias).
103
103
104
104
```http
105
-
PUT /aliases/my-alias?api-version=2021-04-30-preview
105
+
PUT /aliases/my-alias?api-version=2023-10-01-preview
106
106
{
107
107
"name": "my-alias",
108
108
"indexes": ["hotel-samples-index2"]
109
109
}
110
110
```
111
+
111
112
After you make the update to the alias, requests will automatically start to be routed to the new index.
0 commit comments