- Resource: AttributesConfig
- CatalogAttribute
- AttributeType
- IndexableOption
- DynamicFacetableOption
- SearchableOption
- ExactSearchableOption
- RetrievableOption
- FacetConfig
- IgnoredFacetValues
- MergedFacetValue
- MergedFacet
- RerankConfig
- AttributeConfigLevel
- Methods
Resource: AttributesConfig
Catalog level attribute config.
JSON representation |
---|
{ "name": string, "catalogAttributes": { string: { object ( |
Fields | |
---|---|
name |
Required. Immutable. The fully qualified resource name of the attribute config. Format: |
catalogAttributes |
Enable attribute(s) config at catalog level. For example, indexable, dynamicFacetable, or searchable for each attribute. The key is catalog attribute's name. For example: The maximum number of catalog attributes allowed in a request is 1000. |
attributeConfigLevel |
Output only. The |
CatalogAttribute
Catalog level attribute config for an attribute. For example, if customers want to enable/disable facet for a specific attribute.
JSON representation |
---|
{ "key": string, "inUse": boolean, "type": enum ( |
Fields | |
---|---|
key |
Required. Attribute name. For example: If the attribute key starts with |
inUse |
Output only. Indicates whether this attribute has been used by any products.
Only pre-loaded After catalog changes, it takes about 10 minutes for this field to update. |
type |
Output only. The type of this attribute. This is derived from the attribute in |
indexableOption |
When Must be specified when |
dynamicFacetableOption |
If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic facet. Could only be DYNAMIC_FACETABLE_DISABLED if Must be specified, otherwise throws INVALID_FORMAT error. |
searchableOption |
When If SEARCHABLE_ENABLED but attribute type is numerical, attribute values will not be searchable by text queries in Must be specified, when |
recommendationsFilteringOption |
When |
exactSearchableOption |
If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable. This property only applies to textual custom attributes and requires indexable set to enabled to enable exact-searchable. If unset, the server behavior defaults to |
retrievableOption |
If RETRIEVABLE_ENABLED, attribute values are retrievable in the search results. If unset, the server behavior defaults to |
facetConfig |
Contains facet options. |
AttributeType
The type of an attribute.
Enums | |
---|---|
UNKNOWN |
The type of the attribute is unknown. Used when type cannot be derived from attribute that is not |
TEXTUAL |
Textual attribute. |
NUMERICAL |
Numerical attribute. |
IndexableOption
The status of the indexable option of a catalog attribute.
Enums | |
---|---|
INDEXABLE_OPTION_UNSPECIFIED |
Value used when unset. |
INDEXABLE_ENABLED |
Indexable option enabled for an attribute. |
INDEXABLE_DISABLED |
Indexable option disabled for an attribute. |
DynamicFacetableOption
The status of the dynamic facetable option of a catalog attribute.
Enums | |
---|---|
DYNAMIC_FACETABLE_OPTION_UNSPECIFIED |
Value used when unset. |
DYNAMIC_FACETABLE_ENABLED |
Dynamic facetable option enabled for an attribute. |
DYNAMIC_FACETABLE_DISABLED |
Dynamic facetable option disabled for an attribute. |
SearchableOption
The status of the searchable option of a catalog attribute.
Enums | |
---|---|
SEARCHABLE_OPTION_UNSPECIFIED |
Value used when unset. |
SEARCHABLE_ENABLED |
Searchable option enabled for an attribute. |
SEARCHABLE_DISABLED |
Searchable option disabled for an attribute. |
ExactSearchableOption
The status of the exact-searchable option of a catalog attribute.
Enums | |
---|---|
EXACT_SEARCHABLE_OPTION_UNSPECIFIED |
Value used when unset. |
EXACT_SEARCHABLE_ENABLED |
Exact searchable option enabled for an attribute. |
EXACT_SEARCHABLE_DISABLED |
Exact searchable option disabled for an attribute. |
RetrievableOption
The status of the retrievable option of a catalog attribute.
Enums | |
---|---|
RETRIEVABLE_OPTION_UNSPECIFIED |
Value used when unset. |
RETRIEVABLE_ENABLED |
Retrievable option enabled for an attribute. |
RETRIEVABLE_DISABLED |
Retrievable option disabled for an attribute. |
FacetConfig
Possible options for the facet that corresponds to the current attribute config.
JSON representation |
---|
{ "facetIntervals": [ { object ( |
Fields | |
---|---|
facetIntervals[] |
If you don't set the facet |
ignoredFacetValues[] |
Each instance represents a list of attribute values to ignore as facet values for a specific time range. The maximum number of instances per |
mergedFacetValues[] |
Each instance replaces a list of facet values by a merged facet value. If a facet value is not in any list, then it will stay the same. To avoid conflicts, only paths of length 1 are accepted. In other words, if "dark_blue" merged into "BLUE", then the latter can't merge into "blues" because this would create a path of length 2. The maximum number of instances of MergedFacetValue per |
mergedFacet |
Use this field only if you want to merge a facet key into another facet key. |
rerankConfig |
Set this field only if you want to rerank based on facet values engaged by the user for the current key. This option is only possible for custom facetable textual keys. |
IgnoredFacetValues
Facet values
to ignore on facets
during the specified time range for the given SearchResponse.Facet.key
attribute.
JSON representation |
---|
{ "values": [ string ], "startTime": string, "endTime": string } |
Fields | |
---|---|
values[] |
List of facet values to ignore for the following time range. The facet values are the same as the attribute values. There is a limit of 10 values per instance of IgnoredFacetValues. Each value can have at most 128 characters. |
startTime |
Time range for the current list of facet values to ignore. If multiple time ranges are specified for an facet value for the current attribute, consider all of them. If both are empty, ignore always. If start time and end time are set, then start time must be before end time. If start time is not empty and end time is empty, then will ignore these facet values after the start time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
endTime |
If start time is empty and end time is not empty, then ignore these facet values before end time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
MergedFacetValue
Replaces a set of textual facet values by the same (possibly different) merged facet value. Each facet value should appear at most once as a value per CatalogAttribute
. This feature is available only for textual custom attributes.
JSON representation |
---|
{ "values": [ string ], "mergedValue": string } |
Fields | |
---|---|
values[] |
All the facet values that are replaces by the same |
mergedValue |
All the previous values are replaced by this merged facet value. This mergedValue must be non-empty and can have up to 128 characters. |
MergedFacet
The current facet key (i.e. attribute config) maps into the mergedFacetKey
. A facet key can have at most one child. The current facet key and the merged facet key need both to be textual custom attributes or both numerical custom attributes (same type).
JSON representation |
---|
{ "mergedFacetKey": string } |
Fields | |
---|---|
mergedFacetKey |
The merged facet key should be a valid facet key that is different than the facet key of the current catalog attribute. We refer this is merged facet key as the child of the current catalog attribute. This merged facet key can't be a parent of another facet key (i.e. no directed path of length 2). This merged facet key needs to be either a textual custom attribute or a numerical custom attribute. |
RerankConfig
Options to rerank based on facet values engaged by the user for the current key. That key needs to be a custom textual key and facetable. To use this control, you also need to pass all the facet keys engaged by the user in the request using the field [SearchRequest.FacetSpec]. In particular, if you don't pass the facet keys engaged that you want to rerank on, this control won't be effective. Moreover, to obtain better results, the facet values that you want to rerank on should be close to English (ideally made of words, underscores, and spaces).
JSON representation |
---|
{ "rerankFacet": boolean, "facetValues": [ string ] } |
Fields | |
---|---|
rerankFacet |
If set to true, then we also rerank the dynamic facets based on the facet values engaged by the user for the current attribute key during serving. |
facetValues[] |
If empty, rerank on all facet values for the current key. Otherwise, will rerank on the facet values from this list only. |
AttributeConfigLevel
At which level we offer configuration for attributes.
Enums | |
---|---|
ATTRIBUTE_CONFIG_LEVEL_UNSPECIFIED |
Value used when unset. In this case, server behavior defaults to CATALOG_LEVEL_ATTRIBUTE_CONFIG . |
PRODUCT_LEVEL_ATTRIBUTE_CONFIG |
At this level, we honor the attribute configurations set in Product.attributes . |
CATALOG_LEVEL_ATTRIBUTE_CONFIG |
At this level, we honor the attribute configurations set in [CatalogConfig.attribute_configs][]. |
Methods |
|
---|---|
|
Adds the specified CatalogAttribute to the AttributesConfig . |
|
Removes all specified CatalogAttribute s from the AttributesConfig . |
|
Removes the specified CatalogAttribute from the AttributesConfig . |
|
Replaces the specified CatalogAttribute in the AttributesConfig by updating the catalog attribute with the same CatalogAttribute.key . |