Class: Couchbase::Cluster::SearchSort::SearchSortField
- Inherits:
-
Couchbase::Cluster::SearchSort
- Object
- Couchbase::Cluster::SearchSort
- Couchbase::Cluster::SearchSort::SearchSortField
- Defined in:
- lib/couchbase/search_options.rb,
/Users/sergey.auseyau/code/couchbase-ruby-client/lib/couchbase/search_options.rb more...
Instance Attribute Summary collapse
-
#desc ⇒ Boolean
If descending order should be applied.
-
#field ⇒ String
readonly
Name of the field to sort by.
-
#missing ⇒ :first, :last
Where the documents with missing field should be placed.
- #mode ⇒ :default, ...
- #type ⇒ :auto, ...
Instance Method Summary collapse
-
#initialize(field) {|| ... } ⇒ SearchSortField
constructor
A new instance of SearchSortField.
Methods inherited from Couchbase::Cluster::SearchSort
field, geo_distance, id, score
Constructor Details
#initialize(field) {|| ... } ⇒ SearchSortField
Returns a new instance of SearchSortField.
1148 1149 1150 1151 1152 |
# File 'lib/couchbase/search_options.rb', line 1148 def initialize(field) super() @field = field yield self if block_given? end |
Instance Attribute Details
#desc ⇒ Boolean
Returns if descending order should be applied.
1135 1136 1137 |
# File 'lib/couchbase/search_options.rb', line 1135 def desc @desc end |
#field ⇒ String (readonly)
Returns name of the field to sort by.
1132 1133 1134 |
# File 'lib/couchbase/search_options.rb', line 1132 def field @field end |
#missing ⇒ :first, :last
Returns where the documents with missing field should be placed.
1141 1142 1143 |
# File 'lib/couchbase/search_options.rb', line 1141 def missing @missing end |
#mode ⇒ :default, ...
1144 1145 1146 |
# File 'lib/couchbase/search_options.rb', line 1144 def mode @mode end |
#type ⇒ :auto, ...
1138 1139 1140 |
# File 'lib/couchbase/search_options.rb', line 1138 def type @type end |