Skip to content

Commit 2be4507

Browse files
committed
Edited to incorporate feedback.
1 parent a66b94c commit 2be4507

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ ms.topic: conceptual
1313
ms.custom: seodec2018
1414
---
1515

16-
# Field mappings in Azure Search indexers
16+
# Field mappings and transformations using Azure Search indexers
1717

18-
When using Azure Search indexers, you sometimes find that your input data doesn't quite match the schema of your target index. In those cases, you can use **field mappings** to reshape your data during the indexing process.
18+
When using Azure Search indexers, you sometimes find that the input data doesn't quite match the schema of your target index. In those cases, you can use **field mappings** to reshape your data during the indexing process.
1919

2020
Some situations where field mappings are useful:
2121

@@ -42,7 +42,7 @@ Field mappings are added to the `fieldMappings` array of the indexer definition.
4242

4343
## Map fields using the REST API
4444

45-
You can add field mappings when creating a new indexer using the [Create Indexer](https://msdn.microsoft.com/library/azure/dn946899.aspx) API request. You can manage the field mappings of an existing indexer using the [Update Indexer](https://msdn.microsoft.com/library/azure/dn946892.aspx) API request.
45+
You can add field mappings when creating a new indexer using the [Create Indexer](https://docs.microsoft.com/rest/api/searchservice/create-Indexer) API request. You can manage the field mappings of an existing indexer using the [Update Indexer](https://docs.microsoft.com/rest/api/searchservice/update-indexer) API request.
4646

4747
For example, here's how to map a source field to a target field with a different name:
4848

@@ -81,7 +81,7 @@ You can specify field mappings when constructing the indexer, or later by direct
8181

8282
The following C# example sets the field mappings when constructing an indexer.
8383

84-
```C#
84+
```csharp
8585
List<FieldMapping> map = new List<FieldMapping> {
8686
// removes a leading underscore from a field name
8787
new FieldMapping("_custId", "custId"),
@@ -103,7 +103,7 @@ The following C# example sets the field mappings when constructing an indexer.
103103

104104
## Field mapping functions
105105

106-
A field mapping function transforms the contents of a field before it is stored in the index. The following mapping functions are currently supported:
106+
A field mapping function transforms the contents of a field before it's stored in the index. The following mapping functions are currently supported:
107107

108108
* [base64Encode](#base64EncodeFunction)
109109
* [base64Decode](#base64DecodeFunction)
@@ -137,7 +137,7 @@ When you retrieve the encoded key at search time, you can then use the `base64De
137137

138138
If you don't include a parameters property for your mapping function, it defaults to the value `{"useHttpServerUtilityUrlTokenEncode" : true}`.
139139

140-
Azure Search supports two different Base64 encodings. You should use the same parameters when encoding and decoding the same field. For more details, see [base64 encoding options](#base64details) to decide which parameters to use.
140+
Azure Search supports two different Base64 encodings. You should use the same parameters when encoding and decoding the same field. For more information, see [base64 encoding options](#base64details) to decide which parameters to use.
141141

142142
<a name="base64DecodeFunction"></a>
143143

@@ -147,7 +147,7 @@ Performs Base64 decoding of the input string. The input is assumed to be a *URL-
147147

148148
#### Example - decode blob metadata or URLs
149149

150-
Your source data might contain contains Base64-encoded strings, such as blob metadata strings or web URLs, that you want to make searchable as plain text. You can use the `base64Decode` function to turn the encoded data back into regular strings when populating your search index.
150+
Your source data might contain Base64-encoded strings, such as blob metadata strings or web URLs, that you want to make searchable as plain text. You can use the `base64Decode` function to turn the encoded data back into regular strings when populating your search index.
151151

152152
```JSON
153153

@@ -170,11 +170,11 @@ Azure Search supports two different Base64 encodings. You should use the same pa
170170

171171
#### base64 encoding options
172172

173-
Azure Search supports two different Base64 encodings: **HttpServerUtility URL token**, and **URL-safe Base64 encoding without padding**. You must use the same encoding as the mapping functions to encode a document key for lookup, encode a value that will be decoded by the indexer, or decode a field that was encoded by the indexer.
173+
Azure Search supports two different Base64 encodings: **HttpServerUtility URL token**, and **URL-safe Base64 encoding without padding**. A string that is base64-encoded during indexing should later be decoded with the same encoding options, or else the result won't match the original.
174174

175175
If the `useHttpServerUtilityUrlTokenEncode` or `useHttpServerUtilityUrlTokenDecode` parameters for encoding and decoding respectively are set to `true`, then `base64Encode` behaves like [HttpServerUtility.UrlTokenEncode](https://msdn.microsoft.com/library/system.web.httpserverutility.urltokenencode.aspx) and `base64Decode` behaves like [HttpServerUtility.UrlTokenDecode](https://msdn.microsoft.com/library/system.web.httpserverutility.urltokendecode.aspx).
176176

177-
If you are not using the full .NET Framework (that is, you are using .NET Core or other programming environment) to produce the key values to emulate Azure Search behavior, then you should set `useHttpServerUtilityUrlTokenEncode` and `useHttpServerUtilityUrlTokenDecode` to `false`. Depending on the library you use, the base64 encode and decode utility functions might differ from the ones used by Azure Search.
177+
If you are not using the full .NET Framework (that is, you are using .NET Core or another framework) to produce the key values to emulate Azure Search behavior, then you should set `useHttpServerUtilityUrlTokenEncode` and `useHttpServerUtilityUrlTokenDecode` to `false`. Depending on the library you use, the base64 encoding and decoding functions might differ from the ones used by Azure Search.
178178

179179
The following table compares different base64 encodings of the string `00>00?00`. To determine the required additional processing (if any) for your base64 functions, apply your library encode function on the string `00>00?00` and compare the output with the expected output `MDA-MDA_MDA`.
180180

0 commit comments

Comments
 (0)