FieldMappingFunction.JsonArrayToStringCollection Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a field mapping function that transforms a string formatted as a JSON array of strings into a string array that can be used to populate a Collection(Edm.String) field in the index.
public static Microsoft.Azure.Search.Models.FieldMappingFunction JsonArrayToStringCollection ();
static member JsonArrayToStringCollection : unit -> Microsoft.Azure.Search.Models.FieldMappingFunction
Public Shared Function JsonArrayToStringCollection () As FieldMappingFunction
Returns
A new field mapping function.
Remarks
For example, if the input string is ["red", "white", "blue"], then the target field of type Collection(Edm.String) will be populated with the three values red, white and blue. For input values that cannot be parsed as JSON string arrays, an error will be returned.
Sample use case: Azure SQL database doesn't have a built-in data type that naturally maps to Collection(Edm.String) fields in Azure Search. To populate string collection fields, format your source data as a JSON string array and use this function.
Applies to
Azure SDK for .NET