Class: Google::Cloud::Retail::V2::CatalogAttribute
- Inherits:
-
Object
- Object
- Google::Cloud::Retail::V2::CatalogAttribute
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/retail/v2/catalog.rb
Overview
Catalog level attribute config for an attribute. For example, if customers want to enable/disable facet for a specific attribute.
Defined Under Namespace
Modules: AttributeType, DynamicFacetableOption, ExactSearchableOption, IndexableOption, RetrievableOption, SearchableOption Classes: FacetConfig
Instance Attribute Summary collapse
-
#dynamic_facetable_option ⇒ ::Google::Cloud::Retail::V2::CatalogAttribute::DynamicFacetableOption
If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic facet.
-
#exact_searchable_option ⇒ ::Google::Cloud::Retail::V2::CatalogAttribute::ExactSearchableOption
If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable.
-
#facet_config ⇒ ::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig
Contains facet options.
-
#in_use ⇒ ::Boolean
readonly
Output only.
-
#indexable_option ⇒ ::Google::Cloud::Retail::V2::CatalogAttribute::IndexableOption
When AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values are indexed so that it can be filtered, faceted, or boosted in SearchService.Search.
-
#key ⇒ ::String
Required.
-
#retrievable_option ⇒ ::Google::Cloud::Retail::V2::CatalogAttribute::RetrievableOption
If RETRIEVABLE_ENABLED, attribute values are retrievable in the search results.
-
#searchable_option ⇒ ::Google::Cloud::Retail::V2::CatalogAttribute::SearchableOption
When AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values are searchable by text queries in SearchService.Search.
-
#type ⇒ ::Google::Cloud::Retail::V2::CatalogAttribute::AttributeType
readonly
Output only.
Instance Attribute Details
#dynamic_facetable_option ⇒ ::Google::Cloud::Retail::V2::CatalogAttribute::DynamicFacetableOption
Returns If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic facet. Could only be DYNAMIC_FACETABLE_DISABLED if CatalogAttribute.indexable_option is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned.
Must be specified, otherwise throws INVALID_FORMAT error.
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 |
# File 'proto_docs/google/cloud/retail/v2/catalog.rb', line 175 class CatalogAttribute include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Possible options for the facet that corresponds to the current attribute # config. # @!attribute [rw] facet_intervals # @return [::Array<::Google::Cloud::Retail::V2::Interval>] # If you don't set the facet # {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals} # in the request to a numerical attribute, then we use the computed # intervals with rounded bounds obtained from all its product numerical # attribute values. The computed intervals might not be ideal for some # attributes. Therefore, we give you the option to overwrite them with the # facet_intervals field. The maximum of facet intervals per # {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} is 40. Each # interval must have a lower bound or an upper bound. If both bounds are # provided, then the lower bound must be smaller or equal than the upper # bound. # @!attribute [rw] ignored_facet_values # @return [::Array<::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::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 # {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} is 25. # @!attribute [rw] merged_facet_values # @return [::Array<::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacetValue>] # 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 # {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} is 100. This # feature is available only for textual custom attributes. # @!attribute [rw] merged_facet # @return [::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacet] # Use this field only if you want to merge a facet key into another facet # key. # @!attribute [rw] rerank_config # @return [::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::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. class FacetConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # {::Google::Cloud::Retail::V2::SearchResponse::Facet#values Facet values} to # ignore on {::Google::Cloud::Retail::V2::SearchResponse::Facet facets} during # the specified time range for the given # {::Google::Cloud::Retail::V2::SearchResponse::Facet#key SearchResponse.Facet.key} # attribute. # @!attribute [rw] values # @return [::Array<::String>] # 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. # @!attribute [rw] start_time # @return [::Google::Protobuf::Timestamp] # 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. # @!attribute [rw] end_time # @return [::Google::Protobuf::Timestamp] # If start time is empty and end time is not empty, then ignore these # facet values before end time. class IgnoredFacetValues include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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 {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute}. # This feature is available only for textual custom attributes. # @!attribute [rw] values # @return [::Array<::String>] # All the facet values that are replaces by the same # {::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacetValue#merged_value merged_value} # that follows. The maximum number of values per MergedFacetValue is 25. # Each value can have up to 128 characters. # @!attribute [rw] merged_value # @return [::String] # All the previous values are replaced by this merged facet value. # This merged_value must be non-empty and can have up to 128 characters. class MergedFacetValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The current facet key (i.e. attribute config) maps into the # {::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacet#merged_facet_key merged_facet_key}. # 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). # @!attribute [rw] merged_facet_key # @return [::String] # 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. class MergedFacet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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). # @!attribute [rw] rerank_facet # @return [::Boolean] # 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. # @!attribute [rw] facet_values # @return [::Array<::String>] # If empty, rerank on all facet values for the current key. Otherwise, # will rerank on the facet values from this list only. class RerankConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # The type of an attribute. module AttributeType # The type of the attribute is unknown. # # Used when type cannot be derived from attribute that is not # {::Google::Cloud::Retail::V2::CatalogAttribute#in_use in_use}. UNKNOWN = 0 # Textual attribute. TEXTUAL = 1 # Numerical attribute. NUMERICAL = 2 end # The status of the indexable option of a catalog attribute. module IndexableOption # Value used when unset. INDEXABLE_OPTION_UNSPECIFIED = 0 # Indexable option enabled for an attribute. INDEXABLE_ENABLED = 1 # Indexable option disabled for an attribute. INDEXABLE_DISABLED = 2 end # The status of the dynamic facetable option of a catalog attribute. module DynamicFacetableOption # Value used when unset. DYNAMIC_FACETABLE_OPTION_UNSPECIFIED = 0 # Dynamic facetable option enabled for an attribute. DYNAMIC_FACETABLE_ENABLED = 1 # Dynamic facetable option disabled for an attribute. DYNAMIC_FACETABLE_DISABLED = 2 end # The status of the searchable option of a catalog attribute. module SearchableOption # Value used when unset. SEARCHABLE_OPTION_UNSPECIFIED = 0 # Searchable option enabled for an attribute. SEARCHABLE_ENABLED = 1 # Searchable option disabled for an attribute. SEARCHABLE_DISABLED = 2 end # The status of the exact-searchable option of a catalog attribute. module ExactSearchableOption # Value used when unset. EXACT_SEARCHABLE_OPTION_UNSPECIFIED = 0 # Exact searchable option enabled for an attribute. EXACT_SEARCHABLE_ENABLED = 1 # Exact searchable option disabled for an attribute. EXACT_SEARCHABLE_DISABLED = 2 end # The status of the retrievable option of a catalog attribute. module RetrievableOption # Value used when unset. RETRIEVABLE_OPTION_UNSPECIFIED = 0 # Retrievable option enabled for an attribute. RETRIEVABLE_ENABLED = 1 # Retrievable option disabled for an attribute. RETRIEVABLE_DISABLED = 2 end end |
#exact_searchable_option ⇒ ::Google::Cloud::Retail::V2::CatalogAttribute::ExactSearchableOption
Returns 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 EXACT_SEARCHABLE_DISABLED.
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 |
# File 'proto_docs/google/cloud/retail/v2/catalog.rb', line 175 class CatalogAttribute include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Possible options for the facet that corresponds to the current attribute # config. # @!attribute [rw] facet_intervals # @return [::Array<::Google::Cloud::Retail::V2::Interval>] # If you don't set the facet # {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals} # in the request to a numerical attribute, then we use the computed # intervals with rounded bounds obtained from all its product numerical # attribute values. The computed intervals might not be ideal for some # attributes. Therefore, we give you the option to overwrite them with the # facet_intervals field. The maximum of facet intervals per # {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} is 40. Each # interval must have a lower bound or an upper bound. If both bounds are # provided, then the lower bound must be smaller or equal than the upper # bound. # @!attribute [rw] ignored_facet_values # @return [::Array<::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::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 # {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} is 25. # @!attribute [rw] merged_facet_values # @return [::Array<::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacetValue>] # 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 # {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} is 100. This # feature is available only for textual custom attributes. # @!attribute [rw] merged_facet # @return [::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacet] # Use this field only if you want to merge a facet key into another facet # key. # @!attribute [rw] rerank_config # @return [::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::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. class FacetConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # {::Google::Cloud::Retail::V2::SearchResponse::Facet#values Facet values} to # ignore on {::Google::Cloud::Retail::V2::SearchResponse::Facet facets} during # the specified time range for the given # {::Google::Cloud::Retail::V2::SearchResponse::Facet#key SearchResponse.Facet.key} # attribute. # @!attribute [rw] values # @return [::Array<::String>] # 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. # @!attribute [rw] start_time # @return [::Google::Protobuf::Timestamp] # 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. # @!attribute [rw] end_time # @return [::Google::Protobuf::Timestamp] # If start time is empty and end time is not empty, then ignore these # facet values before end time. class IgnoredFacetValues include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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 {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute}. # This feature is available only for textual custom attributes. # @!attribute [rw] values # @return [::Array<::String>] # All the facet values that are replaces by the same # {::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacetValue#merged_value merged_value} # that follows. The maximum number of values per MergedFacetValue is 25. # Each value can have up to 128 characters. # @!attribute [rw] merged_value # @return [::String] # All the previous values are replaced by this merged facet value. # This merged_value must be non-empty and can have up to 128 characters. class MergedFacetValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The current facet key (i.e. attribute config) maps into the # {::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacet#merged_facet_key merged_facet_key}. # 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). # @!attribute [rw] merged_facet_key # @return [::String] # 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. class MergedFacet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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). # @!attribute [rw] rerank_facet # @return [::Boolean] # 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. # @!attribute [rw] facet_values # @return [::Array<::String>] # If empty, rerank on all facet values for the current key. Otherwise, # will rerank on the facet values from this list only. class RerankConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # The type of an attribute. module AttributeType # The type of the attribute is unknown. # # Used when type cannot be derived from attribute that is not # {::Google::Cloud::Retail::V2::CatalogAttribute#in_use in_use}. UNKNOWN = 0 # Textual attribute. TEXTUAL = 1 # Numerical attribute. NUMERICAL = 2 end # The status of the indexable option of a catalog attribute. module IndexableOption # Value used when unset. INDEXABLE_OPTION_UNSPECIFIED = 0 # Indexable option enabled for an attribute. INDEXABLE_ENABLED = 1 # Indexable option disabled for an attribute. INDEXABLE_DISABLED = 2 end # The status of the dynamic facetable option of a catalog attribute. module DynamicFacetableOption # Value used when unset. DYNAMIC_FACETABLE_OPTION_UNSPECIFIED = 0 # Dynamic facetable option enabled for an attribute. DYNAMIC_FACETABLE_ENABLED = 1 # Dynamic facetable option disabled for an attribute. DYNAMIC_FACETABLE_DISABLED = 2 end # The status of the searchable option of a catalog attribute. module SearchableOption # Value used when unset. SEARCHABLE_OPTION_UNSPECIFIED = 0 # Searchable option enabled for an attribute. SEARCHABLE_ENABLED = 1 # Searchable option disabled for an attribute. SEARCHABLE_DISABLED = 2 end # The status of the exact-searchable option of a catalog attribute. module ExactSearchableOption # Value used when unset. EXACT_SEARCHABLE_OPTION_UNSPECIFIED = 0 # Exact searchable option enabled for an attribute. EXACT_SEARCHABLE_ENABLED = 1 # Exact searchable option disabled for an attribute. EXACT_SEARCHABLE_DISABLED = 2 end # The status of the retrievable option of a catalog attribute. module RetrievableOption # Value used when unset. RETRIEVABLE_OPTION_UNSPECIFIED = 0 # Retrievable option enabled for an attribute. RETRIEVABLE_ENABLED = 1 # Retrievable option disabled for an attribute. RETRIEVABLE_DISABLED = 2 end end |
#facet_config ⇒ ::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig
Returns Contains facet options.
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 |
# File 'proto_docs/google/cloud/retail/v2/catalog.rb', line 175 class CatalogAttribute include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Possible options for the facet that corresponds to the current attribute # config. # @!attribute [rw] facet_intervals # @return [::Array<::Google::Cloud::Retail::V2::Interval>] # If you don't set the facet # {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals} # in the request to a numerical attribute, then we use the computed # intervals with rounded bounds obtained from all its product numerical # attribute values. The computed intervals might not be ideal for some # attributes. Therefore, we give you the option to overwrite them with the # facet_intervals field. The maximum of facet intervals per # {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} is 40. Each # interval must have a lower bound or an upper bound. If both bounds are # provided, then the lower bound must be smaller or equal than the upper # bound. # @!attribute [rw] ignored_facet_values # @return [::Array<::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::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 # {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} is 25. # @!attribute [rw] merged_facet_values # @return [::Array<::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacetValue>] # 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 # {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} is 100. This # feature is available only for textual custom attributes. # @!attribute [rw] merged_facet # @return [::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacet] # Use this field only if you want to merge a facet key into another facet # key. # @!attribute [rw] rerank_config # @return [::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::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. class FacetConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # {::Google::Cloud::Retail::V2::SearchResponse::Facet#values Facet values} to # ignore on {::Google::Cloud::Retail::V2::SearchResponse::Facet facets} during # the specified time range for the given # {::Google::Cloud::Retail::V2::SearchResponse::Facet#key SearchResponse.Facet.key} # attribute. # @!attribute [rw] values # @return [::Array<::String>] # 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. # @!attribute [rw] start_time # @return [::Google::Protobuf::Timestamp] # 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. # @!attribute [rw] end_time # @return [::Google::Protobuf::Timestamp] # If start time is empty and end time is not empty, then ignore these # facet values before end time. class IgnoredFacetValues include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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 {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute}. # This feature is available only for textual custom attributes. # @!attribute [rw] values # @return [::Array<::String>] # All the facet values that are replaces by the same # {::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacetValue#merged_value merged_value} # that follows. The maximum number of values per MergedFacetValue is 25. # Each value can have up to 128 characters. # @!attribute [rw] merged_value # @return [::String] # All the previous values are replaced by this merged facet value. # This merged_value must be non-empty and can have up to 128 characters. class MergedFacetValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The current facet key (i.e. attribute config) maps into the # {::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacet#merged_facet_key merged_facet_key}. # 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). # @!attribute [rw] merged_facet_key # @return [::String] # 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. class MergedFacet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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). # @!attribute [rw] rerank_facet # @return [::Boolean] # 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. # @!attribute [rw] facet_values # @return [::Array<::String>] # If empty, rerank on all facet values for the current key. Otherwise, # will rerank on the facet values from this list only. class RerankConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # The type of an attribute. module AttributeType # The type of the attribute is unknown. # # Used when type cannot be derived from attribute that is not # {::Google::Cloud::Retail::V2::CatalogAttribute#in_use in_use}. UNKNOWN = 0 # Textual attribute. TEXTUAL = 1 # Numerical attribute. NUMERICAL = 2 end # The status of the indexable option of a catalog attribute. module IndexableOption # Value used when unset. INDEXABLE_OPTION_UNSPECIFIED = 0 # Indexable option enabled for an attribute. INDEXABLE_ENABLED = 1 # Indexable option disabled for an attribute. INDEXABLE_DISABLED = 2 end # The status of the dynamic facetable option of a catalog attribute. module DynamicFacetableOption # Value used when unset. DYNAMIC_FACETABLE_OPTION_UNSPECIFIED = 0 # Dynamic facetable option enabled for an attribute. DYNAMIC_FACETABLE_ENABLED = 1 # Dynamic facetable option disabled for an attribute. DYNAMIC_FACETABLE_DISABLED = 2 end # The status of the searchable option of a catalog attribute. module SearchableOption # Value used when unset. SEARCHABLE_OPTION_UNSPECIFIED = 0 # Searchable option enabled for an attribute. SEARCHABLE_ENABLED = 1 # Searchable option disabled for an attribute. SEARCHABLE_DISABLED = 2 end # The status of the exact-searchable option of a catalog attribute. module ExactSearchableOption # Value used when unset. EXACT_SEARCHABLE_OPTION_UNSPECIFIED = 0 # Exact searchable option enabled for an attribute. EXACT_SEARCHABLE_ENABLED = 1 # Exact searchable option disabled for an attribute. EXACT_SEARCHABLE_DISABLED = 2 end # The status of the retrievable option of a catalog attribute. module RetrievableOption # Value used when unset. RETRIEVABLE_OPTION_UNSPECIFIED = 0 # Retrievable option enabled for an attribute. RETRIEVABLE_ENABLED = 1 # Retrievable option disabled for an attribute. RETRIEVABLE_DISABLED = 2 end end |
#in_use ⇒ ::Boolean (readonly)
Returns Output only. Indicates whether this attribute has been used by any
products. True
if at least one Product
is using this attribute in
Product.attributes. Otherwise,
this field is False
.
CatalogAttribute can be
pre-loaded by using
CatalogService.AddCatalogAttribute,
[CatalogService.ImportCatalogAttributes][], or
CatalogService.UpdateAttributesConfig
APIs. This field is False
for pre-loaded
CatalogAttributes.
Only pre-loaded [catalog attributes][google.cloud.retail.v2.CatalogAttribute] that are neither in use by products nor predefined can be deleted. [Catalog attributes][google.cloud.retail.v2.CatalogAttribute] that are either in use by products or are predefined attributes cannot be deleted; however, their configuration properties will reset to default values upon removal request.
After catalog changes, it takes about 10 minutes for this field to update.
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 |
# File 'proto_docs/google/cloud/retail/v2/catalog.rb', line 175 class CatalogAttribute include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Possible options for the facet that corresponds to the current attribute # config. # @!attribute [rw] facet_intervals # @return [::Array<::Google::Cloud::Retail::V2::Interval>] # If you don't set the facet # {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals} # in the request to a numerical attribute, then we use the computed # intervals with rounded bounds obtained from all its product numerical # attribute values. The computed intervals might not be ideal for some # attributes. Therefore, we give you the option to overwrite them with the # facet_intervals field. The maximum of facet intervals per # {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} is 40. Each # interval must have a lower bound or an upper bound. If both bounds are # provided, then the lower bound must be smaller or equal than the upper # bound. # @!attribute [rw] ignored_facet_values # @return [::Array<::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::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 # {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} is 25. # @!attribute [rw] merged_facet_values # @return [::Array<::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacetValue>] # 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 # {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} is 100. This # feature is available only for textual custom attributes. # @!attribute [rw] merged_facet # @return [::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacet] # Use this field only if you want to merge a facet key into another facet # key. # @!attribute [rw] rerank_config # @return [::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::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. class FacetConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # {::Google::Cloud::Retail::V2::SearchResponse::Facet#values Facet values} to # ignore on {::Google::Cloud::Retail::V2::SearchResponse::Facet facets} during # the specified time range for the given # {::Google::Cloud::Retail::V2::SearchResponse::Facet#key SearchResponse.Facet.key} # attribute. # @!attribute [rw] values # @return [::Array<::String>] # 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. # @!attribute [rw] start_time # @return [::Google::Protobuf::Timestamp] # 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. # @!attribute [rw] end_time # @return [::Google::Protobuf::Timestamp] # If start time is empty and end time is not empty, then ignore these # facet values before end time. class IgnoredFacetValues include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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 {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute}. # This feature is available only for textual custom attributes. # @!attribute [rw] values # @return [::Array<::String>] # All the facet values that are replaces by the same # {::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacetValue#merged_value merged_value} # that follows. The maximum number of values per MergedFacetValue is 25. # Each value can have up to 128 characters. # @!attribute [rw] merged_value # @return [::String] # All the previous values are replaced by this merged facet value. # This merged_value must be non-empty and can have up to 128 characters. class MergedFacetValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The current facet key (i.e. attribute config) maps into the # {::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacet#merged_facet_key merged_facet_key}. # 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). # @!attribute [rw] merged_facet_key # @return [::String] # 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. class MergedFacet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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). # @!attribute [rw] rerank_facet # @return [::Boolean] # 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. # @!attribute [rw] facet_values # @return [::Array<::String>] # If empty, rerank on all facet values for the current key. Otherwise, # will rerank on the facet values from this list only. class RerankConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # The type of an attribute. module AttributeType # The type of the attribute is unknown. # # Used when type cannot be derived from attribute that is not # {::Google::Cloud::Retail::V2::CatalogAttribute#in_use in_use}. UNKNOWN = 0 # Textual attribute. TEXTUAL = 1 # Numerical attribute. NUMERICAL = 2 end # The status of the indexable option of a catalog attribute. module IndexableOption # Value used when unset. INDEXABLE_OPTION_UNSPECIFIED = 0 # Indexable option enabled for an attribute. INDEXABLE_ENABLED = 1 # Indexable option disabled for an attribute. INDEXABLE_DISABLED = 2 end # The status of the dynamic facetable option of a catalog attribute. module DynamicFacetableOption # Value used when unset. DYNAMIC_FACETABLE_OPTION_UNSPECIFIED = 0 # Dynamic facetable option enabled for an attribute. DYNAMIC_FACETABLE_ENABLED = 1 # Dynamic facetable option disabled for an attribute. DYNAMIC_FACETABLE_DISABLED = 2 end # The status of the searchable option of a catalog attribute. module SearchableOption # Value used when unset. SEARCHABLE_OPTION_UNSPECIFIED = 0 # Searchable option enabled for an attribute. SEARCHABLE_ENABLED = 1 # Searchable option disabled for an attribute. SEARCHABLE_DISABLED = 2 end # The status of the exact-searchable option of a catalog attribute. module ExactSearchableOption # Value used when unset. EXACT_SEARCHABLE_OPTION_UNSPECIFIED = 0 # Exact searchable option enabled for an attribute. EXACT_SEARCHABLE_ENABLED = 1 # Exact searchable option disabled for an attribute. EXACT_SEARCHABLE_DISABLED = 2 end # The status of the retrievable option of a catalog attribute. module RetrievableOption # Value used when unset. RETRIEVABLE_OPTION_UNSPECIFIED = 0 # Retrievable option enabled for an attribute. RETRIEVABLE_ENABLED = 1 # Retrievable option disabled for an attribute. RETRIEVABLE_DISABLED = 2 end end |
#indexable_option ⇒ ::Google::Cloud::Retail::V2::CatalogAttribute::IndexableOption
Returns When AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values are indexed so that it can be filtered, faceted, or boosted in SearchService.Search.
Must be specified when AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error.
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 |
# File 'proto_docs/google/cloud/retail/v2/catalog.rb', line 175 class CatalogAttribute include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Possible options for the facet that corresponds to the current attribute # config. # @!attribute [rw] facet_intervals # @return [::Array<::Google::Cloud::Retail::V2::Interval>] # If you don't set the facet # {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals} # in the request to a numerical attribute, then we use the computed # intervals with rounded bounds obtained from all its product numerical # attribute values. The computed intervals might not be ideal for some # attributes. Therefore, we give you the option to overwrite them with the # facet_intervals field. The maximum of facet intervals per # {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} is 40. Each # interval must have a lower bound or an upper bound. If both bounds are # provided, then the lower bound must be smaller or equal than the upper # bound. # @!attribute [rw] ignored_facet_values # @return [::Array<::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::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 # {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} is 25. # @!attribute [rw] merged_facet_values # @return [::Array<::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacetValue>] # 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 # {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} is 100. This # feature is available only for textual custom attributes. # @!attribute [rw] merged_facet # @return [::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacet] # Use this field only if you want to merge a facet key into another facet # key. # @!attribute [rw] rerank_config # @return [::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::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. class FacetConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # {::Google::Cloud::Retail::V2::SearchResponse::Facet#values Facet values} to # ignore on {::Google::Cloud::Retail::V2::SearchResponse::Facet facets} during # the specified time range for the given # {::Google::Cloud::Retail::V2::SearchResponse::Facet#key SearchResponse.Facet.key} # attribute. # @!attribute [rw] values # @return [::Array<::String>] # 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. # @!attribute [rw] start_time # @return [::Google::Protobuf::Timestamp] # 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. # @!attribute [rw] end_time # @return [::Google::Protobuf::Timestamp] # If start time is empty and end time is not empty, then ignore these # facet values before end time. class IgnoredFacetValues include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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 {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute}. # This feature is available only for textual custom attributes. # @!attribute [rw] values # @return [::Array<::String>] # All the facet values that are replaces by the same # {::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacetValue#merged_value merged_value} # that follows. The maximum number of values per MergedFacetValue is 25. # Each value can have up to 128 characters. # @!attribute [rw] merged_value # @return [::String] # All the previous values are replaced by this merged facet value. # This merged_value must be non-empty and can have up to 128 characters. class MergedFacetValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The current facet key (i.e. attribute config) maps into the # {::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacet#merged_facet_key merged_facet_key}. # 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). # @!attribute [rw] merged_facet_key # @return [::String] # 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. class MergedFacet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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). # @!attribute [rw] rerank_facet # @return [::Boolean] # 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. # @!attribute [rw] facet_values # @return [::Array<::String>] # If empty, rerank on all facet values for the current key. Otherwise, # will rerank on the facet values from this list only. class RerankConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # The type of an attribute. module AttributeType # The type of the attribute is unknown. # # Used when type cannot be derived from attribute that is not # {::Google::Cloud::Retail::V2::CatalogAttribute#in_use in_use}. UNKNOWN = 0 # Textual attribute. TEXTUAL = 1 # Numerical attribute. NUMERICAL = 2 end # The status of the indexable option of a catalog attribute. module IndexableOption # Value used when unset. INDEXABLE_OPTION_UNSPECIFIED = 0 # Indexable option enabled for an attribute. INDEXABLE_ENABLED = 1 # Indexable option disabled for an attribute. INDEXABLE_DISABLED = 2 end # The status of the dynamic facetable option of a catalog attribute. module DynamicFacetableOption # Value used when unset. DYNAMIC_FACETABLE_OPTION_UNSPECIFIED = 0 # Dynamic facetable option enabled for an attribute. DYNAMIC_FACETABLE_ENABLED = 1 # Dynamic facetable option disabled for an attribute. DYNAMIC_FACETABLE_DISABLED = 2 end # The status of the searchable option of a catalog attribute. module SearchableOption # Value used when unset. SEARCHABLE_OPTION_UNSPECIFIED = 0 # Searchable option enabled for an attribute. SEARCHABLE_ENABLED = 1 # Searchable option disabled for an attribute. SEARCHABLE_DISABLED = 2 end # The status of the exact-searchable option of a catalog attribute. module ExactSearchableOption # Value used when unset. EXACT_SEARCHABLE_OPTION_UNSPECIFIED = 0 # Exact searchable option enabled for an attribute. EXACT_SEARCHABLE_ENABLED = 1 # Exact searchable option disabled for an attribute. EXACT_SEARCHABLE_DISABLED = 2 end # The status of the retrievable option of a catalog attribute. module RetrievableOption # Value used when unset. RETRIEVABLE_OPTION_UNSPECIFIED = 0 # Retrievable option enabled for an attribute. RETRIEVABLE_ENABLED = 1 # Retrievable option disabled for an attribute. RETRIEVABLE_DISABLED = 2 end end |
#key ⇒ ::String
Returns Required. Attribute name.
For example: color
, brands
, attributes.custom_attribute
, such as
attributes.xyz
.
To be indexable, the attribute name can contain only alpha-numeric
characters and underscores. For example, an attribute named
attributes.abc_xyz
can be indexed, but an attribute named
attributes.abc-xyz
cannot be indexed.
If the attribute key starts with attributes.
, then the attribute is a
custom attribute. Attributes such as brands
, patterns
, and title
are
built-in and called system attributes.
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 |
# File 'proto_docs/google/cloud/retail/v2/catalog.rb', line 175 class CatalogAttribute include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Possible options for the facet that corresponds to the current attribute # config. # @!attribute [rw] facet_intervals # @return [::Array<::Google::Cloud::Retail::V2::Interval>] # If you don't set the facet # {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals} # in the request to a numerical attribute, then we use the computed # intervals with rounded bounds obtained from all its product numerical # attribute values. The computed intervals might not be ideal for some # attributes. Therefore, we give you the option to overwrite them with the # facet_intervals field. The maximum of facet intervals per # {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} is 40. Each # interval must have a lower bound or an upper bound. If both bounds are # provided, then the lower bound must be smaller or equal than the upper # bound. # @!attribute [rw] ignored_facet_values # @return [::Array<::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::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 # {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} is 25. # @!attribute [rw] merged_facet_values # @return [::Array<::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacetValue>] # 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 # {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} is 100. This # feature is available only for textual custom attributes. # @!attribute [rw] merged_facet # @return [::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacet] # Use this field only if you want to merge a facet key into another facet # key. # @!attribute [rw] rerank_config # @return [::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::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. class FacetConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # {::Google::Cloud::Retail::V2::SearchResponse::Facet#values Facet values} to # ignore on {::Google::Cloud::Retail::V2::SearchResponse::Facet facets} during # the specified time range for the given # {::Google::Cloud::Retail::V2::SearchResponse::Facet#key SearchResponse.Facet.key} # attribute. # @!attribute [rw] values # @return [::Array<::String>] # 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. # @!attribute [rw] start_time # @return [::Google::Protobuf::Timestamp] # 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. # @!attribute [rw] end_time # @return [::Google::Protobuf::Timestamp] # If start time is empty and end time is not empty, then ignore these # facet values before end time. class IgnoredFacetValues include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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 {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute}. # This feature is available only for textual custom attributes. # @!attribute [rw] values # @return [::Array<::String>] # All the facet values that are replaces by the same # {::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacetValue#merged_value merged_value} # that follows. The maximum number of values per MergedFacetValue is 25. # Each value can have up to 128 characters. # @!attribute [rw] merged_value # @return [::String] # All the previous values are replaced by this merged facet value. # This merged_value must be non-empty and can have up to 128 characters. class MergedFacetValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The current facet key (i.e. attribute config) maps into the # {::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacet#merged_facet_key merged_facet_key}. # 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). # @!attribute [rw] merged_facet_key # @return [::String] # 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. class MergedFacet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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). # @!attribute [rw] rerank_facet # @return [::Boolean] # 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. # @!attribute [rw] facet_values # @return [::Array<::String>] # If empty, rerank on all facet values for the current key. Otherwise, # will rerank on the facet values from this list only. class RerankConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # The type of an attribute. module AttributeType # The type of the attribute is unknown. # # Used when type cannot be derived from attribute that is not # {::Google::Cloud::Retail::V2::CatalogAttribute#in_use in_use}. UNKNOWN = 0 # Textual attribute. TEXTUAL = 1 # Numerical attribute. NUMERICAL = 2 end # The status of the indexable option of a catalog attribute. module IndexableOption # Value used when unset. INDEXABLE_OPTION_UNSPECIFIED = 0 # Indexable option enabled for an attribute. INDEXABLE_ENABLED = 1 # Indexable option disabled for an attribute. INDEXABLE_DISABLED = 2 end # The status of the dynamic facetable option of a catalog attribute. module DynamicFacetableOption # Value used when unset. DYNAMIC_FACETABLE_OPTION_UNSPECIFIED = 0 # Dynamic facetable option enabled for an attribute. DYNAMIC_FACETABLE_ENABLED = 1 # Dynamic facetable option disabled for an attribute. DYNAMIC_FACETABLE_DISABLED = 2 end # The status of the searchable option of a catalog attribute. module SearchableOption # Value used when unset. SEARCHABLE_OPTION_UNSPECIFIED = 0 # Searchable option enabled for an attribute. SEARCHABLE_ENABLED = 1 # Searchable option disabled for an attribute. SEARCHABLE_DISABLED = 2 end # The status of the exact-searchable option of a catalog attribute. module ExactSearchableOption # Value used when unset. EXACT_SEARCHABLE_OPTION_UNSPECIFIED = 0 # Exact searchable option enabled for an attribute. EXACT_SEARCHABLE_ENABLED = 1 # Exact searchable option disabled for an attribute. EXACT_SEARCHABLE_DISABLED = 2 end # The status of the retrievable option of a catalog attribute. module RetrievableOption # Value used when unset. RETRIEVABLE_OPTION_UNSPECIFIED = 0 # Retrievable option enabled for an attribute. RETRIEVABLE_ENABLED = 1 # Retrievable option disabled for an attribute. RETRIEVABLE_DISABLED = 2 end end |
#retrievable_option ⇒ ::Google::Cloud::Retail::V2::CatalogAttribute::RetrievableOption
Returns If RETRIEVABLE_ENABLED, attribute values are retrievable in the search results. If unset, the server behavior defaults to RETRIEVABLE_DISABLED.
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 |
# File 'proto_docs/google/cloud/retail/v2/catalog.rb', line 175 class CatalogAttribute include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Possible options for the facet that corresponds to the current attribute # config. # @!attribute [rw] facet_intervals # @return [::Array<::Google::Cloud::Retail::V2::Interval>] # If you don't set the facet # {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals} # in the request to a numerical attribute, then we use the computed # intervals with rounded bounds obtained from all its product numerical # attribute values. The computed intervals might not be ideal for some # attributes. Therefore, we give you the option to overwrite them with the # facet_intervals field. The maximum of facet intervals per # {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} is 40. Each # interval must have a lower bound or an upper bound. If both bounds are # provided, then the lower bound must be smaller or equal than the upper # bound. # @!attribute [rw] ignored_facet_values # @return [::Array<::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::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 # {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} is 25. # @!attribute [rw] merged_facet_values # @return [::Array<::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacetValue>] # 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 # {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} is 100. This # feature is available only for textual custom attributes. # @!attribute [rw] merged_facet # @return [::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacet] # Use this field only if you want to merge a facet key into another facet # key. # @!attribute [rw] rerank_config # @return [::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::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. class FacetConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # {::Google::Cloud::Retail::V2::SearchResponse::Facet#values Facet values} to # ignore on {::Google::Cloud::Retail::V2::SearchResponse::Facet facets} during # the specified time range for the given # {::Google::Cloud::Retail::V2::SearchResponse::Facet#key SearchResponse.Facet.key} # attribute. # @!attribute [rw] values # @return [::Array<::String>] # 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. # @!attribute [rw] start_time # @return [::Google::Protobuf::Timestamp] # 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. # @!attribute [rw] end_time # @return [::Google::Protobuf::Timestamp] # If start time is empty and end time is not empty, then ignore these # facet values before end time. class IgnoredFacetValues include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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 {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute}. # This feature is available only for textual custom attributes. # @!attribute [rw] values # @return [::Array<::String>] # All the facet values that are replaces by the same # {::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacetValue#merged_value merged_value} # that follows. The maximum number of values per MergedFacetValue is 25. # Each value can have up to 128 characters. # @!attribute [rw] merged_value # @return [::String] # All the previous values are replaced by this merged facet value. # This merged_value must be non-empty and can have up to 128 characters. class MergedFacetValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The current facet key (i.e. attribute config) maps into the # {::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacet#merged_facet_key merged_facet_key}. # 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). # @!attribute [rw] merged_facet_key # @return [::String] # 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. class MergedFacet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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). # @!attribute [rw] rerank_facet # @return [::Boolean] # 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. # @!attribute [rw] facet_values # @return [::Array<::String>] # If empty, rerank on all facet values for the current key. Otherwise, # will rerank on the facet values from this list only. class RerankConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # The type of an attribute. module AttributeType # The type of the attribute is unknown. # # Used when type cannot be derived from attribute that is not # {::Google::Cloud::Retail::V2::CatalogAttribute#in_use in_use}. UNKNOWN = 0 # Textual attribute. TEXTUAL = 1 # Numerical attribute. NUMERICAL = 2 end # The status of the indexable option of a catalog attribute. module IndexableOption # Value used when unset. INDEXABLE_OPTION_UNSPECIFIED = 0 # Indexable option enabled for an attribute. INDEXABLE_ENABLED = 1 # Indexable option disabled for an attribute. INDEXABLE_DISABLED = 2 end # The status of the dynamic facetable option of a catalog attribute. module DynamicFacetableOption # Value used when unset. DYNAMIC_FACETABLE_OPTION_UNSPECIFIED = 0 # Dynamic facetable option enabled for an attribute. DYNAMIC_FACETABLE_ENABLED = 1 # Dynamic facetable option disabled for an attribute. DYNAMIC_FACETABLE_DISABLED = 2 end # The status of the searchable option of a catalog attribute. module SearchableOption # Value used when unset. SEARCHABLE_OPTION_UNSPECIFIED = 0 # Searchable option enabled for an attribute. SEARCHABLE_ENABLED = 1 # Searchable option disabled for an attribute. SEARCHABLE_DISABLED = 2 end # The status of the exact-searchable option of a catalog attribute. module ExactSearchableOption # Value used when unset. EXACT_SEARCHABLE_OPTION_UNSPECIFIED = 0 # Exact searchable option enabled for an attribute. EXACT_SEARCHABLE_ENABLED = 1 # Exact searchable option disabled for an attribute. EXACT_SEARCHABLE_DISABLED = 2 end # The status of the retrievable option of a catalog attribute. module RetrievableOption # Value used when unset. RETRIEVABLE_OPTION_UNSPECIFIED = 0 # Retrievable option enabled for an attribute. RETRIEVABLE_ENABLED = 1 # Retrievable option disabled for an attribute. RETRIEVABLE_DISABLED = 2 end end |
#searchable_option ⇒ ::Google::Cloud::Retail::V2::CatalogAttribute::SearchableOption
Returns When AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values are searchable by text queries in SearchService.Search.
If SEARCHABLE_ENABLED but attribute type is numerical, attribute values will not be searchable by text queries in SearchService.Search, as there are no text values associated to numerical attributes.
Must be specified, when AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error.
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 |
# File 'proto_docs/google/cloud/retail/v2/catalog.rb', line 175 class CatalogAttribute include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Possible options for the facet that corresponds to the current attribute # config. # @!attribute [rw] facet_intervals # @return [::Array<::Google::Cloud::Retail::V2::Interval>] # If you don't set the facet # {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals} # in the request to a numerical attribute, then we use the computed # intervals with rounded bounds obtained from all its product numerical # attribute values. The computed intervals might not be ideal for some # attributes. Therefore, we give you the option to overwrite them with the # facet_intervals field. The maximum of facet intervals per # {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} is 40. Each # interval must have a lower bound or an upper bound. If both bounds are # provided, then the lower bound must be smaller or equal than the upper # bound. # @!attribute [rw] ignored_facet_values # @return [::Array<::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::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 # {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} is 25. # @!attribute [rw] merged_facet_values # @return [::Array<::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacetValue>] # 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 # {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} is 100. This # feature is available only for textual custom attributes. # @!attribute [rw] merged_facet # @return [::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacet] # Use this field only if you want to merge a facet key into another facet # key. # @!attribute [rw] rerank_config # @return [::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::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. class FacetConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # {::Google::Cloud::Retail::V2::SearchResponse::Facet#values Facet values} to # ignore on {::Google::Cloud::Retail::V2::SearchResponse::Facet facets} during # the specified time range for the given # {::Google::Cloud::Retail::V2::SearchResponse::Facet#key SearchResponse.Facet.key} # attribute. # @!attribute [rw] values # @return [::Array<::String>] # 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. # @!attribute [rw] start_time # @return [::Google::Protobuf::Timestamp] # 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. # @!attribute [rw] end_time # @return [::Google::Protobuf::Timestamp] # If start time is empty and end time is not empty, then ignore these # facet values before end time. class IgnoredFacetValues include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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 {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute}. # This feature is available only for textual custom attributes. # @!attribute [rw] values # @return [::Array<::String>] # All the facet values that are replaces by the same # {::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacetValue#merged_value merged_value} # that follows. The maximum number of values per MergedFacetValue is 25. # Each value can have up to 128 characters. # @!attribute [rw] merged_value # @return [::String] # All the previous values are replaced by this merged facet value. # This merged_value must be non-empty and can have up to 128 characters. class MergedFacetValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The current facet key (i.e. attribute config) maps into the # {::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacet#merged_facet_key merged_facet_key}. # 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). # @!attribute [rw] merged_facet_key # @return [::String] # 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. class MergedFacet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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). # @!attribute [rw] rerank_facet # @return [::Boolean] # 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. # @!attribute [rw] facet_values # @return [::Array<::String>] # If empty, rerank on all facet values for the current key. Otherwise, # will rerank on the facet values from this list only. class RerankConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # The type of an attribute. module AttributeType # The type of the attribute is unknown. # # Used when type cannot be derived from attribute that is not # {::Google::Cloud::Retail::V2::CatalogAttribute#in_use in_use}. UNKNOWN = 0 # Textual attribute. TEXTUAL = 1 # Numerical attribute. NUMERICAL = 2 end # The status of the indexable option of a catalog attribute. module IndexableOption # Value used when unset. INDEXABLE_OPTION_UNSPECIFIED = 0 # Indexable option enabled for an attribute. INDEXABLE_ENABLED = 1 # Indexable option disabled for an attribute. INDEXABLE_DISABLED = 2 end # The status of the dynamic facetable option of a catalog attribute. module DynamicFacetableOption # Value used when unset. DYNAMIC_FACETABLE_OPTION_UNSPECIFIED = 0 # Dynamic facetable option enabled for an attribute. DYNAMIC_FACETABLE_ENABLED = 1 # Dynamic facetable option disabled for an attribute. DYNAMIC_FACETABLE_DISABLED = 2 end # The status of the searchable option of a catalog attribute. module SearchableOption # Value used when unset. SEARCHABLE_OPTION_UNSPECIFIED = 0 # Searchable option enabled for an attribute. SEARCHABLE_ENABLED = 1 # Searchable option disabled for an attribute. SEARCHABLE_DISABLED = 2 end # The status of the exact-searchable option of a catalog attribute. module ExactSearchableOption # Value used when unset. EXACT_SEARCHABLE_OPTION_UNSPECIFIED = 0 # Exact searchable option enabled for an attribute. EXACT_SEARCHABLE_ENABLED = 1 # Exact searchable option disabled for an attribute. EXACT_SEARCHABLE_DISABLED = 2 end # The status of the retrievable option of a catalog attribute. module RetrievableOption # Value used when unset. RETRIEVABLE_OPTION_UNSPECIFIED = 0 # Retrievable option enabled for an attribute. RETRIEVABLE_ENABLED = 1 # Retrievable option disabled for an attribute. RETRIEVABLE_DISABLED = 2 end end |
#type ⇒ ::Google::Cloud::Retail::V2::CatalogAttribute::AttributeType (readonly)
Returns Output only. The type of this attribute. This is derived from the attribute in Product.attributes.
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 |
# File 'proto_docs/google/cloud/retail/v2/catalog.rb', line 175 class CatalogAttribute include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Possible options for the facet that corresponds to the current attribute # config. # @!attribute [rw] facet_intervals # @return [::Array<::Google::Cloud::Retail::V2::Interval>] # If you don't set the facet # {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals} # in the request to a numerical attribute, then we use the computed # intervals with rounded bounds obtained from all its product numerical # attribute values. The computed intervals might not be ideal for some # attributes. Therefore, we give you the option to overwrite them with the # facet_intervals field. The maximum of facet intervals per # {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} is 40. Each # interval must have a lower bound or an upper bound. If both bounds are # provided, then the lower bound must be smaller or equal than the upper # bound. # @!attribute [rw] ignored_facet_values # @return [::Array<::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::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 # {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} is 25. # @!attribute [rw] merged_facet_values # @return [::Array<::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacetValue>] # 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 # {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} is 100. This # feature is available only for textual custom attributes. # @!attribute [rw] merged_facet # @return [::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacet] # Use this field only if you want to merge a facet key into another facet # key. # @!attribute [rw] rerank_config # @return [::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::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. class FacetConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # {::Google::Cloud::Retail::V2::SearchResponse::Facet#values Facet values} to # ignore on {::Google::Cloud::Retail::V2::SearchResponse::Facet facets} during # the specified time range for the given # {::Google::Cloud::Retail::V2::SearchResponse::Facet#key SearchResponse.Facet.key} # attribute. # @!attribute [rw] values # @return [::Array<::String>] # 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. # @!attribute [rw] start_time # @return [::Google::Protobuf::Timestamp] # 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. # @!attribute [rw] end_time # @return [::Google::Protobuf::Timestamp] # If start time is empty and end time is not empty, then ignore these # facet values before end time. class IgnoredFacetValues include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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 {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute}. # This feature is available only for textual custom attributes. # @!attribute [rw] values # @return [::Array<::String>] # All the facet values that are replaces by the same # {::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacetValue#merged_value merged_value} # that follows. The maximum number of values per MergedFacetValue is 25. # Each value can have up to 128 characters. # @!attribute [rw] merged_value # @return [::String] # All the previous values are replaced by this merged facet value. # This merged_value must be non-empty and can have up to 128 characters. class MergedFacetValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The current facet key (i.e. attribute config) maps into the # {::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig::MergedFacet#merged_facet_key merged_facet_key}. # 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). # @!attribute [rw] merged_facet_key # @return [::String] # 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. class MergedFacet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # 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). # @!attribute [rw] rerank_facet # @return [::Boolean] # 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. # @!attribute [rw] facet_values # @return [::Array<::String>] # If empty, rerank on all facet values for the current key. Otherwise, # will rerank on the facet values from this list only. class RerankConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # The type of an attribute. module AttributeType # The type of the attribute is unknown. # # Used when type cannot be derived from attribute that is not # {::Google::Cloud::Retail::V2::CatalogAttribute#in_use in_use}. UNKNOWN = 0 # Textual attribute. TEXTUAL = 1 # Numerical attribute. NUMERICAL = 2 end # The status of the indexable option of a catalog attribute. module IndexableOption # Value used when unset. INDEXABLE_OPTION_UNSPECIFIED = 0 # Indexable option enabled for an attribute. INDEXABLE_ENABLED = 1 # Indexable option disabled for an attribute. INDEXABLE_DISABLED = 2 end # The status of the dynamic facetable option of a catalog attribute. module DynamicFacetableOption # Value used when unset. DYNAMIC_FACETABLE_OPTION_UNSPECIFIED = 0 # Dynamic facetable option enabled for an attribute. DYNAMIC_FACETABLE_ENABLED = 1 # Dynamic facetable option disabled for an attribute. DYNAMIC_FACETABLE_DISABLED = 2 end # The status of the searchable option of a catalog attribute. module SearchableOption # Value used when unset. SEARCHABLE_OPTION_UNSPECIFIED = 0 # Searchable option enabled for an attribute. SEARCHABLE_ENABLED = 1 # Searchable option disabled for an attribute. SEARCHABLE_DISABLED = 2 end # The status of the exact-searchable option of a catalog attribute. module ExactSearchableOption # Value used when unset. EXACT_SEARCHABLE_OPTION_UNSPECIFIED = 0 # Exact searchable option enabled for an attribute. EXACT_SEARCHABLE_ENABLED = 1 # Exact searchable option disabled for an attribute. EXACT_SEARCHABLE_DISABLED = 2 end # The status of the retrievable option of a catalog attribute. module RetrievableOption # Value used when unset. RETRIEVABLE_OPTION_UNSPECIFIED = 0 # Retrievable option enabled for an attribute. RETRIEVABLE_ENABLED = 1 # Retrievable option disabled for an attribute. RETRIEVABLE_DISABLED = 2 end end |