Class: Google::Apis::CloudsearchV1::FacetBucket
- Inherits:
-
Object
- Object
- Google::Apis::CloudsearchV1::FacetBucket
- Defined in:
- generated/google/apis/cloudsearch_v1/classes.rb,
generated/google/apis/cloudsearch_v1/representations.rb,
generated/google/apis/cloudsearch_v1/representations.rb
Overview
A bucket in a facet is the basic unit of operation. A bucket can comprise either a single value OR a contiguous range of values, depending on the type of the field bucketed. FacetBucket is currently used only for returning the response object.
Instance Attribute Summary collapse
-
#count ⇒ Fixnum
Number of results that match the bucket value.
-
#percentage ⇒ Fixnum
Percent of results that match the bucket value.
-
#value ⇒ Google::Apis::CloudsearchV1::Value
Definition of a single value with generic type.
Instance Method Summary collapse
-
#initialize(**args) ⇒ FacetBucket
constructor
A new instance of FacetBucket.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Google::Apis::Core::JsonObjectSupport
Methods included from Google::Apis::Core::Hashable
Constructor Details
#initialize(**args) ⇒ FacetBucket
Returns a new instance of FacetBucket.
991 992 993 |
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 991 def initialize(**args) update!(**args) end |
Instance Attribute Details
#count ⇒ Fixnum
Number of results that match the bucket value. Counts are only returned
for searches when count accuracy is ensured. Can be empty.
Corresponds to the JSON property count
976 977 978 |
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 976 def count @count end |
#percentage ⇒ Fixnum
Percent of results that match the bucket value. This value is between
(0-100]. Percentages are returned for all searches, but are an estimate.
Because percentages are always returned, you should render percentages
instead of counts.
Corresponds to the JSON property percentage
984 985 986 |
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 984 def percentage @percentage end |
#value ⇒ Google::Apis::CloudsearchV1::Value
Definition of a single value with generic type.
Corresponds to the JSON property value
989 990 991 |
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 989 def value @value end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
996 997 998 999 1000 |
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 996 def update!(**args) @count = args[:count] if args.key?(:count) @percentage = args[:percentage] if args.key?(:percentage) @value = args[:value] if args.key?(:value) end |