Skip to content

Commit

Permalink
Merge pull request #263600 from HeidiSteen/heidist-jan
Browse files Browse the repository at this point in the history
[azure search] January refresh #6
  • Loading branch information
v-regandowner authored Jan 19, 2024
2 parents 681bf8e + 8ce59e5 commit 64af179
Show file tree
Hide file tree
Showing 10 changed files with 156 additions and 161 deletions.
6 changes: 3 additions & 3 deletions articles/search/TOC.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,11 @@
items:
- name: Create a vector index
href: vector-search-how-to-create-index.md
- name: Configure a vectorizer (vectors)
- name: Configure a vectorizer (preview)
href: vector-search-how-to-configure-vectorizer.md
- name: Chunk documents (vectors)
- name: Chunk documents
href: vector-search-how-to-chunk-documents.md
- name: Generate embeddings (vectors)
- name: Generate embeddings
href: vector-search-how-to-generate-embeddings.md

- name: Analyzers
Expand Down
13 changes: 6 additions & 7 deletions articles/search/cognitive-search-output-field-mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ ms.service: cognitive-search
ms.custom:
- ignite-2023
ms.topic: conceptual
ms.date: 09/14/2022
ms.date: 01/18/2024
---

# Map enriched output to fields in a search index in Azure AI Search

![Indexer Stages](./media/cognitive-search-output-field-mapping/indexer-stages-output-field-mapping.png "indexer stages")

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:
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:

```json
"outputFieldMappings": [
Expand All @@ -27,7 +27,7 @@ This article explains how to set up *output field mappings* that determine a dat
],
```

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

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.

Expand All @@ -37,7 +37,7 @@ Output field mappings apply to:

+ In-memory content that's created by skills or extracted by an indexer. The source field is a node in an enriched document tree.

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

Output field mappings are applied after [skillset execution](cognitive-search-working-with-skillsets.md) or after document cracking if there's no associated skillset.

Expand All @@ -60,7 +60,7 @@ Output field mappings are added to the `outputFieldMappings` array in an indexer
|----------|-------------|
| 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. |
| 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. |
| 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. |
| 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. |

You can use the REST API or an Azure SDK to define output field mappings.

Expand Down Expand Up @@ -103,7 +103,7 @@ api-key: [admin key]
}
```

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

### [**.NET SDK (C#)**](#tab/csharp)

Expand All @@ -129,7 +129,6 @@ SearchIndexer indexer = new SearchIndexer(

await indexerClient.CreateIndexerAsync(indexer);
```
-->

---

Expand Down
13 changes: 7 additions & 6 deletions articles/search/search-how-to-alias.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ms.service: cognitive-search
ms.custom:
- ignite-2023
ms.topic: how-to
ms.date: 04/04/2023
ms.date: 01/18/2024
---

# Create an index alias in Azure AI Search
Expand Down Expand Up @@ -37,7 +37,7 @@ You can create an alias using the preview REST API, the preview SDKs, or through
You can use the [Create or Update Alias (REST preview)](/rest/api/searchservice/preview-api/create-or-update-alias) to create an index alias.

```http
POST /aliases?api-version=2021-04-30-preview
POST /aliases?api-version=2023-10-01-preview
{
"name": "my-alias",
"indexes": ["hotel-samples-index"]
Expand All @@ -58,7 +58,7 @@ Follow the steps below to create an index alias in the Azure portal.
### [**.NET SDK**](#tab/sdk)


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

```csharp
// Create a SearchIndexClient
Expand All @@ -69,7 +69,7 @@ SearchAlias myAlias = new SearchAlias("my-alias", "hotel-quickstart-index");
adminClient.CreateAlias(myAlias);
```

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

---

Expand All @@ -80,7 +80,7 @@ Once you've created your alias, you're ready to start using it. Aliases can be u
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.

```http
POST /indexes/my-alias/docs/search?api-version=2021-04-30-preview
POST /indexes/my-alias/docs/search?api-version=2023-10-01-preview
{
"search": "pool spa +airport",
"searchMode": any,
Expand All @@ -102,12 +102,13 @@ If you expect to make updates to a production index, specify an alias rather tha
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).

```http
PUT /aliases/my-alias?api-version=2021-04-30-preview
PUT /aliases/my-alias?api-version=2023-10-01-preview
{
"name": "my-alias",
"indexes": ["hotel-samples-index2"]
}
```

After you make the update to the alias, requests will automatically start to be routed to the new index.

> [!NOTE]
Expand Down
Loading

0 comments on commit 64af179

Please sign in to comment.