Share via


FieldMappingFunction.Base64Encode Method

Definition

Overloads

Base64Encode()

Creates a field mapping function that performs URL-safe Base64 encoding of the input string. Assumes that the input is UTF-8 encoded.

Base64Encode(Boolean)

Creates a field mapping function that performs URL-safe Base64 encoding of the input string. Assumes that the input is UTF-8 encoded.

Base64Encode()

Source:
FieldMappingFunction.Customization.cs

Creates a field mapping function that performs URL-safe Base64 encoding of the input string. Assumes that the input is UTF-8 encoded.

public static Microsoft.Azure.Search.Models.FieldMappingFunction Base64Encode ();
static member Base64Encode : unit -> Microsoft.Azure.Search.Models.FieldMappingFunction
Public Shared Function Base64Encode () As FieldMappingFunction

Returns

A new field mapping function.

Remarks

Sample use case: Only URL-safe characters can appear in a search document key (because customers must be able to address the document using the Lookup API, for example). If your data contains URL-unsafe characters and you want to use it to populate a key field in your search index, use this function.

For details on the encoding used, see https://docs.microsoft.com/azure/search/search-indexer-field-mappings#details-of-base64-encoding-and-decoding. Calling this method is the same as calling with useHttpServerUtilityUrlTokenEncode set to true.

Applies to

Base64Encode(Boolean)

Source:
FieldMappingFunction.Customization.cs

Creates a field mapping function that performs URL-safe Base64 encoding of the input string. Assumes that the input is UTF-8 encoded.

public static Microsoft.Azure.Search.Models.FieldMappingFunction Base64Encode (bool useHttpServerUtilityUrlTokenEncode);
static member Base64Encode : bool -> Microsoft.Azure.Search.Models.FieldMappingFunction
Public Shared Function Base64Encode (useHttpServerUtilityUrlTokenEncode As Boolean) As FieldMappingFunction

Parameters

useHttpServerUtilityUrlTokenEncode
Boolean

Determines how Base64 encoding is performed. See https://docs.microsoft.com/azure/search/search-indexer-field-mappings#details-of-base64-encoding-and-decoding for details.

Returns

A new field mapping function.

Remarks

Sample use case: Only URL-safe characters can appear in a search document key (because customers must be able to address the document using the Lookup API, for example). If your data contains URL-unsafe characters and you want to use it to populate a key field in your search index, use this function.

Applies to