Resource: Schema
Defines the structure and layout of a type of document data.
JSON representation |
---|
{ "name": string, "fieldConfigs": [ { object ( |
Fields | |
---|---|
name |
Immutable. The full resource name of the schema, in the format of This field must be a UTF-8 encoded string with a length limit of 1024 characters. |
fieldConfigs[] |
Output only. Configurations for fields of the schema. |
Union field schema . Schema representation. One of struct_schema or json_schema should be provided otherwise an INVALID_ARGUMENT error is thrown. schema can be only one of the following: |
|
structSchema |
The structured representation of the schema. |
jsonSchema |
The JSON representation of the schema. |
FieldConfig
Configurations for fields of a schema. For example, configuring a field is indexable, or searchable.
JSON representation |
---|
{ "fieldPath": string, "fieldType": enum ( |
Fields | |
---|---|
fieldPath |
Required. Field path of the schema field. For example: |
fieldType |
Output only. Raw type of the field. |
indexableOption |
If If |
dynamicFacetableOption |
If If |
searchableOption |
If If If For those fields that do not support setting searchable options, the server will skip searchable option setting, and setting |
retrievableOption |
If If |
completableOption |
If If |
recsFilterableOption |
If If If When a field set to [FILTERABLE_DISABLED] is filtered, a warning is generated and an empty result is returned. |
keyPropertyType |
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 If the schema field has a |
FieldType
Field value type in the Schema.
Enums | |
---|---|
FIELD_TYPE_UNSPECIFIED |
Field type is unspecified. |
OBJECT |
Field value type is Object. |
STRING |
Field value type is String. |
NUMBER |
Field value type is Number. |
INTEGER |
Field value type is Integer. |
BOOLEAN |
Field value type is Boolean. |
IndexableOption
The setting of Indexable options in schema.
Enums | |
---|---|
INDEXABLE_OPTION_UNSPECIFIED |
Value used when unset. |
INDEXABLE_ENABLED |
Indexable option enabled for a schema field. |
INDEXABLE_DISABLED |
Indexable option disabled for a schema field. |
DynamicFacetableOption
The status of the dynamic facetable option of a schema field.
Enums | |
---|---|
DYNAMIC_FACETABLE_OPTION_UNSPECIFIED |
Value used when unset. |
DYNAMIC_FACETABLE_ENABLED |
Dynamic facetable option enabled for a schema field. |
DYNAMIC_FACETABLE_DISABLED |
Dynamic facetable option disabled for a schema field. |
SearchableOption
The setting of Searchable options in schema.
Enums | |
---|---|
SEARCHABLE_OPTION_UNSPECIFIED |
Value used when unset. |
SEARCHABLE_ENABLED |
Searchable option enabled for a schema field. |
SEARCHABLE_DISABLED |
Searchable option disabled for a schema field. |
RetrievableOption
The setting of Retrievable options in schema.
Enums | |
---|---|
RETRIEVABLE_OPTION_UNSPECIFIED |
Value used when unset. |
RETRIEVABLE_ENABLED |
Retrievable option enabled for a schema field. |
RETRIEVABLE_DISABLED |
Retrievable option disabled for a schema field. |
CompletableOption
The setting of Completable options in schema.
Enums | |
---|---|
COMPLETABLE_OPTION_UNSPECIFIED |
Value used when unset. |
COMPLETABLE_ENABLED |
Completable option enabled for a schema field. |
COMPLETABLE_DISABLED |
Completable option disabled for a schema field. |
FilterableOption
Sets the filterable option for schema fields.
Enums | |
---|---|
FILTERABLE_OPTION_UNSPECIFIED |
Value used when unset. |
FILTERABLE_ENABLED |
Filterable option enabled for a schema field. |
FILTERABLE_DISABLED |
Filterable option disabled for a schema field. |
Methods |
|
---|---|
|
Creates a Schema . |
|
Deletes a Schema . |
|
Gets a Schema . |
|
Gets a list of Schema s. |
|
Updates a Schema . |