Class FieldMapping

java.lang.Object
com.azure.search.documents.indexes.models.FieldMapping

public final class FieldMapping extends Object
Defines a mapping between a field in a data source and a target field in an index.
  • Constructor Details

    • FieldMapping

      public FieldMapping(String sourceFieldName)
      Creates an instance of FieldMapping class.
      Parameters:
      sourceFieldName - the sourceFieldName value to set.
  • Method Details

    • getSourceFieldName

      public String getSourceFieldName()
      Get the sourceFieldName property: The name of the field in the data source.
      Returns:
      the sourceFieldName value.
    • getTargetFieldName

      public String 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

      public FieldMapping setTargetFieldName(String targetFieldName)
      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

      public FieldMappingFunction getMappingFunction()
      Get the mappingFunction property: A function to apply to each source field value before indexing.
      Returns:
      the mappingFunction value.
    • setMappingFunction

      public FieldMapping setMappingFunction(FieldMappingFunction mappingFunction)
      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.