EnrichmentOptions

public struct EnrichmentOptions : Codable, Equatable

An object that contains options for the current enrichment. Starting with version 2020-08-30, the enrichment options are not included in responses from the List Enrichments method.

  • An array of supported languages for this enrichment. Required when type is dictionary. Optional when type is rule_based. Not valid when creating any other type of enrichment.

    Declaration

    Swift

    public var languages: [String]?
  • The name of the entity type. This value is used as the field name in the index. Required when type is dictionary or regular_expression. Not valid when creating any other type of enrichment.

    Declaration

    Swift

    public var entityType: String?
  • The regular expression to apply for this enrichment. Required when type is regular_expression. Not valid when creating any other type of enrichment.

    Declaration

    Swift

    public var regularExpression: String?
  • The name of the result document field that this enrichment creates. Required when type is rule_based. Not valid when creating any other type of enrichment.

    Declaration

    Swift

    public var resultField: String?
  • Initialize a EnrichmentOptions with member variables.

    Declaration

    Swift

    public init(
        languages: [String]? = nil,
        entityType: String? = nil,
        regularExpression: String? = nil,
        resultField: String? = nil
    )

    Parameters

    languages

    An array of supported languages for this enrichment. Required when type is dictionary. Optional when type is rule_based. Not valid when creating any other type of enrichment.

    entityType

    The name of the entity type. This value is used as the field name in the index. Required when type is dictionary or regular_expression. Not valid when creating any other type of enrichment.

    regularExpression

    The regular expression to apply for this enrichment. Required when type is regular_expression. Not valid when creating any other type of enrichment.

    resultField

    The name of the result document field that this enrichment creates. Required when type is rule_based. Not valid when creating any other type of enrichment.

    Return Value

    An initialized EnrichmentOptions.