Class: Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaFieldConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/discoveryengine_v1alpha/classes.rb,
lib/google/apis/discoveryengine_v1alpha/representations.rb,
lib/google/apis/discoveryengine_v1alpha/representations.rb

Overview

Configurations for fields of a schema. For example, configuring a field is indexable, or searchable.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1alphaFieldConfig

Returns a new instance of GoogleCloudDiscoveryengineV1alphaFieldConfig.



3463
3464
3465
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 3463

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#completable_optionString

If completable_option is COMPLETABLE_ENABLED, field values are directly used and returned as suggestions for Autocomplete in CompletionService. CompleteQuery. If completable_option is unset, the server behavior defaults to COMPLETABLE_DISABLED for fields that support setting completable options, which are just string fields. For those fields that do not support setting completable options, the server will skip completable option setting, and setting completable_option for those fields will throw INVALID_ARGUMENT error. Corresponds to the JSON property completableOption

Returns:

  • (String)


3379
3380
3381
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 3379

def completable_option
  @completable_option
end

#dynamic_facetable_optionString

If dynamic_facetable_option is DYNAMIC_FACETABLE_ENABLED, field values are available for dynamic facet. Could only be DYNAMIC_FACETABLE_DISABLED if FieldConfig.indexable_option is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error will be returned. If dynamic_facetable_option is unset, the server behavior defaults to DYNAMIC_FACETABLE_DISABLED for fields that support setting dynamic facetable options. For those fields that do not support setting dynamic facetable options, such as object and boolean, the server will skip dynamic facetable option setting, and setting dynamic_facetable_option for those fields will throw INVALID_ARGUMENT error. Corresponds to the JSON property dynamicFacetableOption

Returns:

  • (String)


3392
3393
3394
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 3392

def dynamic_facetable_option
  @dynamic_facetable_option
end

#field_pathString

Required. Field path of the schema field. For example: title, description, release_info.release_year. Corresponds to the JSON property fieldPath

Returns:

  • (String)


3398
3399
3400
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 3398

def field_path
  @field_path
end

#field_typeString

Output only. Raw type of the field. Corresponds to the JSON property fieldType

Returns:

  • (String)


3403
3404
3405
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 3403

def field_type
  @field_type
end

#indexable_optionString

If indexable_option is INDEXABLE_ENABLED, field values are indexed so that it can be filtered or faceted in SearchService.Search. If indexable_option is unset, the server behavior defaults to INDEXABLE_DISABLED for fields that support setting indexable options. For those fields that do not support setting indexable options, such as object and boolean and key properties, the server will skip indexable_option setting, and setting indexable_option for those fields will throw INVALID_ARGUMENT error. Corresponds to the JSON property indexableOption

Returns:

  • (String)


3414
3415
3416
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 3414

def indexable_option
  @indexable_option
end

#key_property_typeString

Output only. Type of the key property that this field is mapped to. Empty string if this is not annotated as mapped to a key property. Example types are title, description. Full list is defined by keyPropertyMapping in the schema field annotation. If the schema field has a KeyPropertyMapping annotation, indexable_option and searchable_option of this field cannot be modified. Corresponds to the JSON property keyPropertyType

Returns:

  • (String)


3424
3425
3426
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 3424

def key_property_type
  @key_property_type
end

#recs_filterable_optionString

If recs_filterable_option is FILTERABLE_ENABLED, field values are filterable by filter expression in RecommendationService.Recommend. If FILTERABLE_ENABLED but the field type is numerical, field values are not filterable by text queries in RecommendationService.Recommend. Only textual fields are supported. If recs_filterable_option is unset, the default setting is FILTERABLE_DISABLED for fields that support setting filterable options. When a field set to [ FILTERABLE_DISABLED] is filtered, a warning is generated and an empty result is returned. Corresponds to the JSON property recsFilterableOption

Returns:

  • (String)


3436
3437
3438
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 3436

def recs_filterable_option
  @recs_filterable_option
end

#retrievable_optionString

If retrievable_option is RETRIEVABLE_ENABLED, field values are included in the search results. If retrievable_option is unset, the server behavior defaults to RETRIEVABLE_DISABLED for fields that support setting retrievable options. For those fields that do not support setting retrievable options, such as object and boolean, the server will skip retrievable option setting, and setting retrievable_option for those fields will throw INVALID_ARGUMENT error. Corresponds to the JSON property retrievableOption

Returns:

  • (String)


3447
3448
3449
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 3447

def retrievable_option
  @retrievable_option
end

#searchable_optionString

If searchable_option is SEARCHABLE_ENABLED, field values are searchable by text queries in SearchService.Search. If SEARCHABLE_ENABLED but field type is numerical, field values will not be searchable by text queries in SearchService.Search, as there are no text values associated to numerical fields. If searchable_option is unset, the server behavior defaults to SEARCHABLE_DISABLED for fields that support setting searchable options. Only string fields that have no key property mapping support setting searchable_option. For those fields that do not support setting searchable options, the server will skip searchable option setting, and setting searchable_option for those fields will throw INVALID_ARGUMENT error. Corresponds to the JSON property searchableOption

Returns:

  • (String)


3461
3462
3463
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 3461

def searchable_option
  @searchable_option
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 3468

def update!(**args)
  @completable_option = args[:completable_option] if args.key?(:completable_option)
  @dynamic_facetable_option = args[:dynamic_facetable_option] if args.key?(:dynamic_facetable_option)
  @field_path = args[:field_path] if args.key?(:field_path)
  @field_type = args[:field_type] if args.key?(:field_type)
  @indexable_option = args[:indexable_option] if args.key?(:indexable_option)
  @key_property_type = args[:key_property_type] if args.key?(:key_property_type)
  @recs_filterable_option = args[:recs_filterable_option] if args.key?(:recs_filterable_option)
  @retrievable_option = args[:retrievable_option] if args.key?(:retrievable_option)
  @searchable_option = args[:searchable_option] if args.key?(:searchable_option)
end