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. |
field |
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: |
|
struct |
The structured representation of the schema. |
json |
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 | |
---|---|
field |
Required. Field path of the schema field. For example: |
field |
Output only. Raw type of the field. |
indexable |
If If |
dynamic |
If If |
searchable |
If If If For those fields that do not support setting searchable options, the server will skip searchable option setting, and setting |
retrievable |
If If |
completable |
If If |
recs |
If If If When a field set to [FILTERABLE_DISABLED] is filtered, a warning is generated and an empty result is returned. |
key |
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 |
advanced |
If this field is set, only the corresponding source will be indexed for this field. Otherwise, the values from different sources are merged. Assuming a page with |
schema |
Field paths for indexing custom attribute from schema.org data. More details of schema.org and its defined types can be found at schema.org. It is only used on advanced site search schema. Currently only support full path from root. The full path to a field is constructed by concatenating field names, starting from
|
metatag |
Optional. The metatag name found in the HTML page. If user defines this field, the value of this metatag name will be used to extract metatag. If the user does not define this field, the |
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. |
GEOLOCATION |
Field value type is Geolocation. Geolocation is expressed as an object with the following keys:
|
DATETIME |
Field value type is Datetime. Datetime can be expressed as either:
|
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. |
AdvancedSiteSearchDataSource
Optional source of the advanced site search field.
Enums | |
---|---|
ADVANCED_SITE_SEARCH_DATA_SOURCE_UNSPECIFIED |
Value used when unset. |
METATAGS |
Retrieve value from meta tag. |
PAGEMAP |
Retrieve value from page map. |
URI_PATTERN_MAPPING |
Retrieve value from the attributes set by SiteSearchEngineService.SetUriPatternDocumentData API. |
SCHEMA_ORG |
Retrieve value from schema.org data. |
Methods |
|
---|---|
|
Creates a Schema . |
|
Deletes a Schema . |
|
Gets a Schema . |
|
Gets a list of Schema s. |
|
Updates a Schema . |