Enrichment
public struct Enrichment : Codable, Equatable
Enrichment step to perform on the document. Each enrichment is performed on the specified field in the order that they are listed in the configuration.
-
Describes what the enrichment step does.
Declaration
Swift
public var description: String? -
Field where enrichments will be stored. This field must already exist or be at most 1 level deeper than an existing field. For example, if
textis a top-level field with no sub-fields,text.foois a valid destination buttext.foo.baris not.Declaration
Swift
public var destinationField: String -
Field to be enriched. Arrays can be specified as the source_field if the enrichment service for this enrichment is set to
natural_language_undstanding.Declaration
Swift
public var sourceField: String -
Indicates that the enrichments will overwrite the destination_field field if it already exists.
Declaration
Swift
public var overwrite: Bool? -
Name of the enrichment service to call. Current options are
natural_language_understandingandelements. When usingnatual_language_understanding, the options object must contain Natural Language Understanding options. When usingelementsthe options object must contain Element Classification options. Additionally, when using theelementsenrichment the configuration specified and files ingested must meet all the criteria specified in the documentation.Declaration
Swift
public var enrichment: String -
If true, then most errors generated during the enrichment process will be treated as warnings and will not cause the document to fail processing.
Declaration
Swift
public var ignoreDownstreamErrors: Bool? -
Options which are specific to a particular enrichment.
Declaration
Swift
public var options: EnrichmentOptions? -
Initialize a
Enrichmentwith member variables.Declaration
Swift
public init( destinationField: String, sourceField: String, enrichment: String, description: String? = nil, overwrite: Bool? = nil, ignoreDownstreamErrors: Bool? = nil, options: EnrichmentOptions? = nil )Parameters
destinationFieldField where enrichments will be stored. This field must already exist or be at most 1 level deeper than an existing field. For example, if
textis a top-level field with no sub-fields,text.foois a valid destination buttext.foo.baris not.sourceFieldField to be enriched. Arrays can be specified as the source_field if the enrichment service for this enrichment is set to
natural_language_undstanding.enrichmentName of the enrichment service to call. Current options are
natural_language_understandingandelements. When usingnatual_language_understanding, the options object must contain Natural Language Understanding options. When usingelementsthe options object must contain Element Classification options. Additionally, when using theelementsenrichment the configuration specified and files ingested must meet all the criteria specified in the documentation.descriptionDescribes what the enrichment step does.
overwriteIndicates that the enrichments will overwrite the destination_field field if it already exists.
ignoreDownstreamErrorsIf true, then most errors generated during the enrichment process will be treated as warnings and will not cause the document to fail processing.
optionsOptions which are specific to a particular enrichment.
Return Value
An initialized
Enrichment.
View on GitHub
Enrichment Structure Reference