Skip to content

Commit 3b527ac

Browse files
committed
more edits
1 parent 0395e9b commit 3b527ac

File tree

1 file changed

+18
-19
lines changed

1 file changed

+18
-19
lines changed

articles/search/search-indexer-field-mappings.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,14 @@ Field mappings can also be used for light-weight data conversions, such as encod
2424

2525
Field mappings apply to:
2626

27-
+ Physical data structures on both sides of the data stream (between fields in a [supported data source](search-indexer-overview.md#supported-data-sources) and fields in a [search index](search-what-is-an-index.md)).
27+
+ Physical data structures on both sides of the data path (source fields in a [supported data source](search-indexer-overview.md#supported-data-sources) and target fields in a [search index](search-what-is-an-index.md)).
2828

29-
If you're importing skill-generated content that resides in memory, use [outputFieldMappings](cognitive-search-output-field-mapping.md) to map in-memory nodes to output fields in a search index.
29+
Logical data structures created by skills reside only in memory. Use [outputFieldMappings](cognitive-search-output-field-mapping.md) to map in-memory nodes to output fields in a search index.
3030

31-
+ Search indexes only. If you're populating a [knowledge store](knowledge-store-concept-intro.md), use [projections](knowledge-store-projections-examples.md) for data path configuration.
31+
+ Search indexes only. To populate a [knowledge store](knowledge-store-concept-intro.md), use [projections](knowledge-store-projections-examples.md) for data path configuration.
3232

3333
+ Top-level search fields only, where the `targetFieldName` is either a simple field or a collection. A target field can't be a complex type.
3434

35-
> [!NOTE]
36-
> If you're working with complex data (nested or hierarchical structures), and you'd like to mirror that data structure in your search index, your search index must match the source structure exactly (same field names, levels, and types) so that the default mappings will work. Optionally, you might want just a few nodes in the complex structure. To get individual nodes, you can flatten incoming data into a string collection (see [outputFieldMappings](cognitive-search-output-field-mapping.md#flatten-complex-structures-into-a-string-collection) for this workaround).
37-
3835
## Supported scenarios
3936

4037
| Use-case | Description |
@@ -45,6 +42,13 @@ Field mappings apply to:
4542
| Encoding and decoding | You can apply [mapping functions](#mappingFunctions) to support Base64 encoding or decoding of data during indexing. |
4643
| Split strings or recast arrays into collections | You can apply [mapping functions](#mappingFunctions) to split a string that includes a delimiter, or to send a JSON array to a search field of type `Collection(Edm.String)`.
4744

45+
> [!NOTE]
46+
> If no field mappings are present, indexers assume data source fields should be mapped to index fields with the same name. Adding a field mapping overrides the default field mappings for the source and target field. Some indexers, such as the [blob storage indexer](search-howto-indexing-azure-blob-storage.md), add default field mappings for the index key field automatically.
47+
48+
Complex fields aren't supported in a field mapping. Your source structure (nested or hierarchical structures) must exactly match the complex type in the index so that the default mappings work. For more information, see [Tutorial: Index nested JSON blobs](search-semi-structured-data.md) for an example. If you get an error similar to `"Field mapping specifies target field 'Address/city' that doesn't exist in the index"`, it's because target field mappings can't be a complex type.
49+
50+
Optionally, you might want just a few nodes in the complex structure. To get individual nodes, you can flatten incoming data into a string collection (see [outputFieldMappings](cognitive-search-output-field-mapping.md#flatten-complex-structures-into-a-string-collection) for this workaround).
51+
4852
## Define a field mapping
4953

5054
This section explains how to set up field mappings.
@@ -79,23 +83,18 @@ This section explains how to set up field mappings.
7983
]
8084
```
8185

82-
| Property | Description |
83-
|----------|-------------|
84-
| sourceFieldName | Required. Represents a field in your data source. |
85-
| targetFieldName | Optional. Represents a field in your search index. If omitted, the value of `sourceFieldName` is assumed for the target. Target fields must be top-level simple fields or collections. It can't be a complex type or collection. If you're handling a data type issue, a field's data type is specified in the index definition. The field mapping just needs to have the field's name.|
86-
| mappingFunction | Optional. Consists of [predefined functions](#mappingFunctions) that transform data. |
87-
88-
If you get an error similar to `"Field mapping specifies target field 'Address/city' that doesn't exist in the index"`, it's because target field mappings can't be a complex type. The workaround is to create an index schema that's identical to the raw content for field names and data types. See [Tutorial: Index nested JSON blobs](search-semi-structured-data.md) for an example.
89-
90-
Azure AI Search uses case-insensitive comparison to resolve the field and function names in field mappings. This is convenient (you don't have to get all the casing right), but it means that your data source or index can't have fields that differ only by case.
91-
92-
> [!NOTE]
93-
> If no field mappings are present, indexers assume data source fields should be mapped to index fields with the same name. Adding a field mapping overrides the default field mappings for the source and target field. Some indexers, such as the [blob storage indexer](search-howto-indexing-azure-blob-storage.md), add default field mappings for the index key field.
86+
| Property | Description |
87+
|----------|-------------|
88+
| sourceFieldName | Required. Represents a field in your data source. |
89+
| targetFieldName | Optional. Represents a field in your search index. If omitted, the value of `sourceFieldName` is assumed for the target. Target fields must be top-level simple fields or collections. It can't be a complex type or collection. If you're handling a data type issue, a field's data type is specified in the index definition. The field mapping just needs to have the field's name.|
90+
| mappingFunction | Optional. Consists of [predefined functions](#mappingFunctions) that transform data. |
9491

9592
#### Example: Name or type discrepancy
9693

9794
An explicit field mapping establishes a data path for cases where name and type aren't identical.
9895

96+
Azure AI Search uses case-insensitive comparison to resolve the field and function names in field mappings. This is convenient (you don't have to get all the casing right), but it means that your data source or index can't have fields that differ only by case.
97+
9998
```JSON
10099
PUT https://[service name].search.windows.net/indexers/myindexer?api-version=[api-version]
101100
Content-Type: application/json
@@ -162,7 +161,7 @@ Note that these functions are exclusively supported for parent indexes at this t
162161

163162
<a name="base64EncodeFunction"></a>
164163

165-
### base64Encode function and examples
164+
### base64Encode function
166165

167166
Performs *URL-safe* Base64 encoding of the input string. Assumes that the input is UTF-8 encoded.
168167

0 commit comments

Comments
 (0)