Class: Google::Apis::CloudsearchV1::Rank
- Inherits:
-
Object
- Object
- Google::Apis::CloudsearchV1::Rank
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/cloudsearch_v1/classes.rb,
lib/google/apis/cloudsearch_v1/representations.rb,
lib/google/apis/cloudsearch_v1/representations.rb
Overview
The rank contains a tuple of numbers which may be used as a general sort order. The rank should be treated as an ordered set of numbers, where the ordering is done in descending order of the most significant rank member. For example, given the following ranks described as (primary, secondary): (1,1), (1,2), (2, 2) (2,1) The descending rank-order is: (2,2) > (2,1) > (1,2) > (1,1)
Instance Attribute Summary collapse
-
#primary ⇒ Fixnum
The primary rank is the most significant rank member.
-
#secondary ⇒ Fixnum
The secondary rank may be used to rank items of identical primary rank.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Rank
constructor
A new instance of Rank.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Rank
Returns a new instance of Rank.
16231 16232 16233 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 16231 def initialize(**args) update!(**args) end |
Instance Attribute Details
#primary ⇒ Fixnum
The primary rank is the most significant rank member. This rank element should
always be present. Items with higher primary rank are always considered of
higher rank than those of lower primary rank.
Corresponds to the JSON property primary
16223 16224 16225 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 16223 def primary @primary end |
#secondary ⇒ Fixnum
The secondary rank may be used to rank items of identical primary rank. This
rank element should always be present.
Corresponds to the JSON property secondary
16229 16230 16231 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 16229 def secondary @secondary end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
16236 16237 16238 16239 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 16236 def update!(**args) @primary = args[:primary] if args.key?(:primary) @secondary = args[:secondary] if args.key?(:secondary) end |