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.
16145 16146 16147 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 16145 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
16137 16138 16139 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 16137 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
16143 16144 16145 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 16143 def secondary @secondary end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
16150 16151 16152 16153 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 16150 def update!(**args) @primary = args[:primary] if args.key?(:primary) @secondary = args[:secondary] if args.key?(:secondary) end |