Class FieldMapping
java.lang.Object
com.azure.search.documents.indexes.models.FieldMapping
Defines a mapping between a field in a data source and a target field in an index.
-
Constructor Summary
ConstructorsConstructorDescriptionFieldMapping
(String sourceFieldName) Creates an instance of FieldMapping class. -
Method Summary
Modifier and TypeMethodDescriptionGet the mappingFunction property: A function to apply to each source field value before indexing.Get the sourceFieldName property: The name of the field in the data source.Get the targetFieldName property: The name of the target field in the index.setMappingFunction
(FieldMappingFunction mappingFunction) Set the mappingFunction property: A function to apply to each source field value before indexing.setTargetFieldName
(String targetFieldName) Set the targetFieldName property: The name of the target field in the index.
-
Constructor Details
-
FieldMapping
Creates an instance of FieldMapping class.- Parameters:
sourceFieldName
- the sourceFieldName value to set.
-
-
Method Details
-
getSourceFieldName
Get the sourceFieldName property: The name of the field in the data source.- Returns:
- the sourceFieldName value.
-
getTargetFieldName
Get the targetFieldName property: The name of the target field in the index. Same as the source field name by default.- Returns:
- the targetFieldName value.
-
setTargetFieldName
Set the targetFieldName property: The name of the target field in the index. Same as the source field name by default.- Parameters:
targetFieldName
- the targetFieldName value to set.- Returns:
- the FieldMapping object itself.
-
getMappingFunction
Get the mappingFunction property: A function to apply to each source field value before indexing.- Returns:
- the mappingFunction value.
-
setMappingFunction
Set the mappingFunction property: A function to apply to each source field value before indexing.- Parameters:
mappingFunction
- the mappingFunction value to set.- Returns:
- the FieldMapping object itself.
-