FieldMapping Class
- java.
lang. Object - com.
azure. search. documents. indexes. models. FieldMapping
- com.
Implements
public final class FieldMapping
implements JsonSerializable<FieldMapping>
Defines a mapping between a field in a data source and a target field in an index.
Constructor Summary
Constructor | Description |
---|---|
FieldMapping(String sourceFieldName) |
Creates an instance of Field |
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Field |
fromJson(JsonReader jsonReader)
Reads an instance of Field |
Field |
getMappingFunction()
Get the mapping |
String |
getSourceFieldName()
Get the source |
String |
getTargetFieldName()
Get the target |
Field |
setMappingFunction(FieldMappingFunction mappingFunction)
Set the mapping |
Field |
setTargetFieldName(String targetFieldName)
Set the target |
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Constructor Details
FieldMapping
public FieldMapping(String sourceFieldName)
Creates an instance of FieldMapping class.
Parameters:
Method Details
fromJson
public static FieldMapping fromJson(JsonReader jsonReader)
Reads an instance of FieldMapping from the JsonReader.
Parameters:
Returns:
Throws:
getMappingFunction
public FieldMappingFunction getMappingFunction()
Get the mappingFunction property: A function to apply to each source field value before indexing.
Returns:
getSourceFieldName
public String getSourceFieldName()
Get the sourceFieldName property: The name of the field in the data source.
Returns:
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:
setMappingFunction
public FieldMapping setMappingFunction(FieldMappingFunction mappingFunction)
Set the mappingFunction property: A function to apply to each source field value before indexing.
Parameters:
Returns:
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:
Returns:
toJson
Applies to
Azure SDK for Java
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour