Class: Google::Cloud::VisionAI::V1::FacetProperty
- Inherits:
-
Object
- Object
- Google::Cloud::VisionAI::V1::FacetProperty
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/visionai/v1/warehouse.rb
Overview
Central configuration for a facet.
Defined Under Namespace
Classes: CustomRangeBucketSpec, DateTimeBucketSpec, FixedRangeBucketSpec
Instance Attribute Summary collapse
-
#bucket_type ⇒ ::Google::Cloud::VisionAI::V1::FacetBucketType
Facet bucket type e.g.
-
#custom_range_bucket_spec ⇒ ::Google::Cloud::VisionAI::V1::FacetProperty::CustomRangeBucketSpec
Custom range facet bucket config.
-
#datetime_bucket_spec ⇒ ::Google::Cloud::VisionAI::V1::FacetProperty::DateTimeBucketSpec
Datetime range facet bucket config.
-
#display_name ⇒ ::String
Display name of the facet.
-
#fixed_range_bucket_spec ⇒ ::Google::Cloud::VisionAI::V1::FacetProperty::FixedRangeBucketSpec
Fixed range facet bucket config.
-
#mapped_fields ⇒ ::Array<::String>
Name of the facets, which are the dimensions users want to use to refine search results.
-
#result_size ⇒ ::Integer
Maximum number of unique bucket to return for one facet.
Instance Attribute Details
#bucket_type ⇒ ::Google::Cloud::VisionAI::V1::FacetBucketType
Returns Facet bucket type e.g. value, range.
2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 |
# File 'proto_docs/google/cloud/visionai/v1/warehouse.rb', line 2220 class FacetProperty include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # If bucket type is FIXED_RANGE, specify how values are bucketized. Use # FixedRangeBucketSpec when you want to create multiple buckets with equal # granularities. Using integer bucket value as an example, when # bucket_start = 0, bucket_granularity = 10, bucket_count = 5, this facet # will be aggregated via the following buckets: # [-inf, 0), [0, 10), [10, 20), [20, 30), [30, inf). # Notably, bucket_count <= 1 is an invalid spec. # @!attribute [rw] bucket_start # @return [::Google::Cloud::VisionAI::V1::FacetValue] # Lower bound of the bucket. NOTE: Only integer type is currently supported # for this field. # @!attribute [rw] bucket_granularity # @return [::Google::Cloud::VisionAI::V1::FacetValue] # Bucket granularity. NOTE: Only integer type is currently supported for # this field. # @!attribute [rw] bucket_count # @return [::Integer] # Total number of buckets. class FixedRangeBucketSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # If bucket type is CUSTOM_RANGE, specify how values are bucketized. Use # integer bucket value as an example, when the endpoints are 0, 10, 100, and # 1000, we will generate the following facets: # [-inf, 0), [0, 10), [10, 100), [100, 1000), [1000, inf). # Notably: # - endpoints must be listed in ascending order. Otherwise, the SearchConfig # API will reject the facet config. # - < 1 endpoints is an invalid spec. # @!attribute [rw] endpoints # @return [::Array<::Google::Cloud::VisionAI::V1::FacetValue>] # Currently, only integer type is supported for this field. class CustomRangeBucketSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # If bucket type is DATE, specify how date values are bucketized. # @!attribute [rw] granularity # @return [::Google::Cloud::VisionAI::V1::FacetProperty::DateTimeBucketSpec::Granularity] # Granularity of date type facet. class DateTimeBucketSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Granularity enum for the datetime bucket. module Granularity # Unspecified granularity. GRANULARITY_UNSPECIFIED = 0 # Granularity is year. YEAR = 1 # Granularity is month. MONTH = 2 # Granularity is day. DAY = 3 end end end |
#custom_range_bucket_spec ⇒ ::Google::Cloud::VisionAI::V1::FacetProperty::CustomRangeBucketSpec
Returns Custom range facet bucket config.
Note: The following fields are mutually exclusive: custom_range_bucket_spec, fixed_range_bucket_spec, datetime_bucket_spec. If a field in that set is populated, all other fields in the set will automatically be cleared.
2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 |
# File 'proto_docs/google/cloud/visionai/v1/warehouse.rb', line 2220 class FacetProperty include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # If bucket type is FIXED_RANGE, specify how values are bucketized. Use # FixedRangeBucketSpec when you want to create multiple buckets with equal # granularities. Using integer bucket value as an example, when # bucket_start = 0, bucket_granularity = 10, bucket_count = 5, this facet # will be aggregated via the following buckets: # [-inf, 0), [0, 10), [10, 20), [20, 30), [30, inf). # Notably, bucket_count <= 1 is an invalid spec. # @!attribute [rw] bucket_start # @return [::Google::Cloud::VisionAI::V1::FacetValue] # Lower bound of the bucket. NOTE: Only integer type is currently supported # for this field. # @!attribute [rw] bucket_granularity # @return [::Google::Cloud::VisionAI::V1::FacetValue] # Bucket granularity. NOTE: Only integer type is currently supported for # this field. # @!attribute [rw] bucket_count # @return [::Integer] # Total number of buckets. class FixedRangeBucketSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # If bucket type is CUSTOM_RANGE, specify how values are bucketized. Use # integer bucket value as an example, when the endpoints are 0, 10, 100, and # 1000, we will generate the following facets: # [-inf, 0), [0, 10), [10, 100), [100, 1000), [1000, inf). # Notably: # - endpoints must be listed in ascending order. Otherwise, the SearchConfig # API will reject the facet config. # - < 1 endpoints is an invalid spec. # @!attribute [rw] endpoints # @return [::Array<::Google::Cloud::VisionAI::V1::FacetValue>] # Currently, only integer type is supported for this field. class CustomRangeBucketSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # If bucket type is DATE, specify how date values are bucketized. # @!attribute [rw] granularity # @return [::Google::Cloud::VisionAI::V1::FacetProperty::DateTimeBucketSpec::Granularity] # Granularity of date type facet. class DateTimeBucketSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Granularity enum for the datetime bucket. module Granularity # Unspecified granularity. GRANULARITY_UNSPECIFIED = 0 # Granularity is year. YEAR = 1 # Granularity is month. MONTH = 2 # Granularity is day. DAY = 3 end end end |
#datetime_bucket_spec ⇒ ::Google::Cloud::VisionAI::V1::FacetProperty::DateTimeBucketSpec
Returns Datetime range facet bucket config.
Note: The following fields are mutually exclusive: datetime_bucket_spec, fixed_range_bucket_spec, custom_range_bucket_spec. If a field in that set is populated, all other fields in the set will automatically be cleared.
2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 |
# File 'proto_docs/google/cloud/visionai/v1/warehouse.rb', line 2220 class FacetProperty include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # If bucket type is FIXED_RANGE, specify how values are bucketized. Use # FixedRangeBucketSpec when you want to create multiple buckets with equal # granularities. Using integer bucket value as an example, when # bucket_start = 0, bucket_granularity = 10, bucket_count = 5, this facet # will be aggregated via the following buckets: # [-inf, 0), [0, 10), [10, 20), [20, 30), [30, inf). # Notably, bucket_count <= 1 is an invalid spec. # @!attribute [rw] bucket_start # @return [::Google::Cloud::VisionAI::V1::FacetValue] # Lower bound of the bucket. NOTE: Only integer type is currently supported # for this field. # @!attribute [rw] bucket_granularity # @return [::Google::Cloud::VisionAI::V1::FacetValue] # Bucket granularity. NOTE: Only integer type is currently supported for # this field. # @!attribute [rw] bucket_count # @return [::Integer] # Total number of buckets. class FixedRangeBucketSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # If bucket type is CUSTOM_RANGE, specify how values are bucketized. Use # integer bucket value as an example, when the endpoints are 0, 10, 100, and # 1000, we will generate the following facets: # [-inf, 0), [0, 10), [10, 100), [100, 1000), [1000, inf). # Notably: # - endpoints must be listed in ascending order. Otherwise, the SearchConfig # API will reject the facet config. # - < 1 endpoints is an invalid spec. # @!attribute [rw] endpoints # @return [::Array<::Google::Cloud::VisionAI::V1::FacetValue>] # Currently, only integer type is supported for this field. class CustomRangeBucketSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # If bucket type is DATE, specify how date values are bucketized. # @!attribute [rw] granularity # @return [::Google::Cloud::VisionAI::V1::FacetProperty::DateTimeBucketSpec::Granularity] # Granularity of date type facet. class DateTimeBucketSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Granularity enum for the datetime bucket. module Granularity # Unspecified granularity. GRANULARITY_UNSPECIFIED = 0 # Granularity is year. YEAR = 1 # Granularity is month. MONTH = 2 # Granularity is day. DAY = 3 end end end |
#display_name ⇒ ::String
Returns Display name of the facet. To be used by UI for facet rendering.
2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 |
# File 'proto_docs/google/cloud/visionai/v1/warehouse.rb', line 2220 class FacetProperty include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # If bucket type is FIXED_RANGE, specify how values are bucketized. Use # FixedRangeBucketSpec when you want to create multiple buckets with equal # granularities. Using integer bucket value as an example, when # bucket_start = 0, bucket_granularity = 10, bucket_count = 5, this facet # will be aggregated via the following buckets: # [-inf, 0), [0, 10), [10, 20), [20, 30), [30, inf). # Notably, bucket_count <= 1 is an invalid spec. # @!attribute [rw] bucket_start # @return [::Google::Cloud::VisionAI::V1::FacetValue] # Lower bound of the bucket. NOTE: Only integer type is currently supported # for this field. # @!attribute [rw] bucket_granularity # @return [::Google::Cloud::VisionAI::V1::FacetValue] # Bucket granularity. NOTE: Only integer type is currently supported for # this field. # @!attribute [rw] bucket_count # @return [::Integer] # Total number of buckets. class FixedRangeBucketSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # If bucket type is CUSTOM_RANGE, specify how values are bucketized. Use # integer bucket value as an example, when the endpoints are 0, 10, 100, and # 1000, we will generate the following facets: # [-inf, 0), [0, 10), [10, 100), [100, 1000), [1000, inf). # Notably: # - endpoints must be listed in ascending order. Otherwise, the SearchConfig # API will reject the facet config. # - < 1 endpoints is an invalid spec. # @!attribute [rw] endpoints # @return [::Array<::Google::Cloud::VisionAI::V1::FacetValue>] # Currently, only integer type is supported for this field. class CustomRangeBucketSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # If bucket type is DATE, specify how date values are bucketized. # @!attribute [rw] granularity # @return [::Google::Cloud::VisionAI::V1::FacetProperty::DateTimeBucketSpec::Granularity] # Granularity of date type facet. class DateTimeBucketSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Granularity enum for the datetime bucket. module Granularity # Unspecified granularity. GRANULARITY_UNSPECIFIED = 0 # Granularity is year. YEAR = 1 # Granularity is month. MONTH = 2 # Granularity is day. DAY = 3 end end end |
#fixed_range_bucket_spec ⇒ ::Google::Cloud::VisionAI::V1::FacetProperty::FixedRangeBucketSpec
Returns Fixed range facet bucket config.
Note: The following fields are mutually exclusive: fixed_range_bucket_spec, custom_range_bucket_spec, datetime_bucket_spec. If a field in that set is populated, all other fields in the set will automatically be cleared.
2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 |
# File 'proto_docs/google/cloud/visionai/v1/warehouse.rb', line 2220 class FacetProperty include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # If bucket type is FIXED_RANGE, specify how values are bucketized. Use # FixedRangeBucketSpec when you want to create multiple buckets with equal # granularities. Using integer bucket value as an example, when # bucket_start = 0, bucket_granularity = 10, bucket_count = 5, this facet # will be aggregated via the following buckets: # [-inf, 0), [0, 10), [10, 20), [20, 30), [30, inf). # Notably, bucket_count <= 1 is an invalid spec. # @!attribute [rw] bucket_start # @return [::Google::Cloud::VisionAI::V1::FacetValue] # Lower bound of the bucket. NOTE: Only integer type is currently supported # for this field. # @!attribute [rw] bucket_granularity # @return [::Google::Cloud::VisionAI::V1::FacetValue] # Bucket granularity. NOTE: Only integer type is currently supported for # this field. # @!attribute [rw] bucket_count # @return [::Integer] # Total number of buckets. class FixedRangeBucketSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # If bucket type is CUSTOM_RANGE, specify how values are bucketized. Use # integer bucket value as an example, when the endpoints are 0, 10, 100, and # 1000, we will generate the following facets: # [-inf, 0), [0, 10), [10, 100), [100, 1000), [1000, inf). # Notably: # - endpoints must be listed in ascending order. Otherwise, the SearchConfig # API will reject the facet config. # - < 1 endpoints is an invalid spec. # @!attribute [rw] endpoints # @return [::Array<::Google::Cloud::VisionAI::V1::FacetValue>] # Currently, only integer type is supported for this field. class CustomRangeBucketSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # If bucket type is DATE, specify how date values are bucketized. # @!attribute [rw] granularity # @return [::Google::Cloud::VisionAI::V1::FacetProperty::DateTimeBucketSpec::Granularity] # Granularity of date type facet. class DateTimeBucketSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Granularity enum for the datetime bucket. module Granularity # Unspecified granularity. GRANULARITY_UNSPECIFIED = 0 # Granularity is year. YEAR = 1 # Granularity is month. MONTH = 2 # Granularity is day. DAY = 3 end end end |
#mapped_fields ⇒ ::Array<::String>
Returns Name of the facets, which are the dimensions users want to use to refine
search results. mapped_fields will match UserSpecifiedDataSchema keys.
For example, user can add a bunch of UGAs with the same key, such as player:adam, player:bob, player:charles. When multiple mapped_fields are specified, will merge their value together as final facet value. E.g. home_team: a, home_team:b, away_team:a, away_team:c, when facet_field = [home_team, away_team], facet_value will be [a, b, c].
UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the mapped_field equals the parent SearchConfig.name, the parent must also contain a SearchCriteriaProperty that maps to the same fields. mapped_fields must not be empty.
2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 |
# File 'proto_docs/google/cloud/visionai/v1/warehouse.rb', line 2220 class FacetProperty include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # If bucket type is FIXED_RANGE, specify how values are bucketized. Use # FixedRangeBucketSpec when you want to create multiple buckets with equal # granularities. Using integer bucket value as an example, when # bucket_start = 0, bucket_granularity = 10, bucket_count = 5, this facet # will be aggregated via the following buckets: # [-inf, 0), [0, 10), [10, 20), [20, 30), [30, inf). # Notably, bucket_count <= 1 is an invalid spec. # @!attribute [rw] bucket_start # @return [::Google::Cloud::VisionAI::V1::FacetValue] # Lower bound of the bucket. NOTE: Only integer type is currently supported # for this field. # @!attribute [rw] bucket_granularity # @return [::Google::Cloud::VisionAI::V1::FacetValue] # Bucket granularity. NOTE: Only integer type is currently supported for # this field. # @!attribute [rw] bucket_count # @return [::Integer] # Total number of buckets. class FixedRangeBucketSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # If bucket type is CUSTOM_RANGE, specify how values are bucketized. Use # integer bucket value as an example, when the endpoints are 0, 10, 100, and # 1000, we will generate the following facets: # [-inf, 0), [0, 10), [10, 100), [100, 1000), [1000, inf). # Notably: # - endpoints must be listed in ascending order. Otherwise, the SearchConfig # API will reject the facet config. # - < 1 endpoints is an invalid spec. # @!attribute [rw] endpoints # @return [::Array<::Google::Cloud::VisionAI::V1::FacetValue>] # Currently, only integer type is supported for this field. class CustomRangeBucketSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # If bucket type is DATE, specify how date values are bucketized. # @!attribute [rw] granularity # @return [::Google::Cloud::VisionAI::V1::FacetProperty::DateTimeBucketSpec::Granularity] # Granularity of date type facet. class DateTimeBucketSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Granularity enum for the datetime bucket. module Granularity # Unspecified granularity. GRANULARITY_UNSPECIFIED = 0 # Granularity is year. YEAR = 1 # Granularity is month. MONTH = 2 # Granularity is day. DAY = 3 end end end |
#result_size ⇒ ::Integer
Returns Maximum number of unique bucket to return for one facet. Bucket number can be large for high-cardinality facet such as "player". We only return top-n most related ones to user. If it's <= 0, the server will decide the appropriate result_size.
2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 |
# File 'proto_docs/google/cloud/visionai/v1/warehouse.rb', line 2220 class FacetProperty include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # If bucket type is FIXED_RANGE, specify how values are bucketized. Use # FixedRangeBucketSpec when you want to create multiple buckets with equal # granularities. Using integer bucket value as an example, when # bucket_start = 0, bucket_granularity = 10, bucket_count = 5, this facet # will be aggregated via the following buckets: # [-inf, 0), [0, 10), [10, 20), [20, 30), [30, inf). # Notably, bucket_count <= 1 is an invalid spec. # @!attribute [rw] bucket_start # @return [::Google::Cloud::VisionAI::V1::FacetValue] # Lower bound of the bucket. NOTE: Only integer type is currently supported # for this field. # @!attribute [rw] bucket_granularity # @return [::Google::Cloud::VisionAI::V1::FacetValue] # Bucket granularity. NOTE: Only integer type is currently supported for # this field. # @!attribute [rw] bucket_count # @return [::Integer] # Total number of buckets. class FixedRangeBucketSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # If bucket type is CUSTOM_RANGE, specify how values are bucketized. Use # integer bucket value as an example, when the endpoints are 0, 10, 100, and # 1000, we will generate the following facets: # [-inf, 0), [0, 10), [10, 100), [100, 1000), [1000, inf). # Notably: # - endpoints must be listed in ascending order. Otherwise, the SearchConfig # API will reject the facet config. # - < 1 endpoints is an invalid spec. # @!attribute [rw] endpoints # @return [::Array<::Google::Cloud::VisionAI::V1::FacetValue>] # Currently, only integer type is supported for this field. class CustomRangeBucketSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # If bucket type is DATE, specify how date values are bucketized. # @!attribute [rw] granularity # @return [::Google::Cloud::VisionAI::V1::FacetProperty::DateTimeBucketSpec::Granularity] # Granularity of date type facet. class DateTimeBucketSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Granularity enum for the datetime bucket. module Granularity # Unspecified granularity. GRANULARITY_UNSPECIFIED = 0 # Granularity is year. YEAR = 1 # Granularity is month. MONTH = 2 # Granularity is day. DAY = 3 end end end |