FieldConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Configurations for fields of a schema. For example, configuring a field is indexable, or searchable.
Attributes | |
---|---|
Name | Description |
field_path |
str
Required. Field path of the schema field. For example: title , description , release_info.release_year .
|
field_type |
google.cloud.discoveryengine_v1alpha.types.FieldConfig.FieldType
Output only. Raw type of the field. |
indexable_option |
google.cloud.discoveryengine_v1alpha.types.FieldConfig.IndexableOption
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.
|
dynamic_facetable_option |
google.cloud.discoveryengine_v1alpha.types.FieldConfig.DynamicFacetableOption
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.
|
searchable_option |
google.cloud.discoveryengine_v1alpha.types.FieldConfig.SearchableOption
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.
|
retrievable_option |
google.cloud.discoveryengine_v1alpha.types.FieldConfig.RetrievableOption
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.
|
completable_option |
google.cloud.discoveryengine_v1alpha.types.FieldConfig.CompletableOption
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.
|
recs_filterable_option |
google.cloud.discoveryengine_v1alpha.types.FieldConfig.FilterableOption
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. |
key_property_type |
str
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.
|
Classes
CompletableOption
CompletableOption(value)
The setting of Completable options in schema.
Values: COMPLETABLE_OPTION_UNSPECIFIED (0): Value used when unset. COMPLETABLE_ENABLED (1): Completable option enabled for a schema field. COMPLETABLE_DISABLED (2): Completable option disabled for a schema field.
DynamicFacetableOption
DynamicFacetableOption(value)
The status of the dynamic facetable option of a schema field.
Values: DYNAMIC_FACETABLE_OPTION_UNSPECIFIED (0): Value used when unset. DYNAMIC_FACETABLE_ENABLED (1): Dynamic facetable option enabled for a schema field. DYNAMIC_FACETABLE_DISABLED (2): Dynamic facetable option disabled for a schema field.
FieldType
FieldType(value)
Field value type in the Schema.
Values: FIELD_TYPE_UNSPECIFIED (0): Field type is unspecified. OBJECT (1): Field value type is Object. STRING (2): Field value type is String. NUMBER (3): Field value type is Number. INTEGER (4): Field value type is Integer. BOOLEAN (5): Field value type is Boolean. GEOLOCATION (6): Field value type is Geolocation. DATETIME (7): Field value type is Datetime.
FilterableOption
FilterableOption(value)
Sets the filterable option for schema fields.
Values: FILTERABLE_OPTION_UNSPECIFIED (0): Value used when unset. FILTERABLE_ENABLED (1): Filterable option enabled for a schema field. FILTERABLE_DISABLED (2): Filterable option disabled for a schema field.
IndexableOption
IndexableOption(value)
The setting of Indexable options in schema.
Values: INDEXABLE_OPTION_UNSPECIFIED (0): Value used when unset. INDEXABLE_ENABLED (1): Indexable option enabled for a schema field. INDEXABLE_DISABLED (2): Indexable option disabled for a schema field.
RetrievableOption
RetrievableOption(value)
The setting of Retrievable options in schema.
Values: RETRIEVABLE_OPTION_UNSPECIFIED (0): Value used when unset. RETRIEVABLE_ENABLED (1): Retrievable option enabled for a schema field. RETRIEVABLE_DISABLED (2): Retrievable option disabled for a schema field.
SearchableOption
SearchableOption(value)
The setting of Searchable options in schema.
Values: SEARCHABLE_OPTION_UNSPECIFIED (0): Value used when unset. SEARCHABLE_ENABLED (1): Searchable option enabled for a schema field. SEARCHABLE_DISABLED (2): Searchable option disabled for a schema field.