SearchModelFactory.FieldMapping(String, String, FieldMappingFunction) 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.
Defines a mapping between a field in a data source and a target field in an index.
public static Azure.Search.Documents.Indexes.Models.FieldMapping FieldMapping(string sourceFieldName = default, string targetFieldName = default, Azure.Search.Documents.Indexes.Models.FieldMappingFunction mappingFunction = default);
static member FieldMapping : string * string * Azure.Search.Documents.Indexes.Models.FieldMappingFunction -> Azure.Search.Documents.Indexes.Models.FieldMapping
Public Shared Function FieldMapping (Optional sourceFieldName As String = Nothing, Optional targetFieldName As String = Nothing, Optional mappingFunction As FieldMappingFunction = Nothing) As FieldMapping
Parameters
- sourceFieldName
- String
The name of the field in the data source.
- targetFieldName
- String
The name of the target field in the index. Same as the source field name by default.
- mappingFunction
- FieldMappingFunction
A function to apply to each source field value before indexing.
Returns
A new FieldMapping instance for mocking.