Class: Couchbase::Cluster::SearchSort::SearchSortGeoDistance
- Inherits:
-
Couchbase::Cluster::SearchSort
- Object
- Couchbase::Cluster::SearchSort
- Couchbase::Cluster::SearchSort::SearchSortGeoDistance
- 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.
- #latitude ⇒ Float readonly
- #longitude ⇒ Float readonly
- #unit ⇒ :meters, ...
Instance Method Summary collapse
-
#initialize(field, longitude, latitude) {|| ... } ⇒ SearchSortGeoDistance
constructor
A new instance of SearchSortGeoDistance.
Methods inherited from Couchbase::Cluster::SearchSort
field, geo_distance, id, score
Constructor Details
#initialize(field, longitude, latitude) {|| ... } ⇒ SearchSortGeoDistance
Returns a new instance of SearchSortGeoDistance.
1096 1097 1098 1099 1100 1101 1102 |
# File 'lib/couchbase/search_options.rb', line 1096 def initialize(field, longitude, latitude) super() @field = field @longitude = longitude @latitude = latitude yield self if block_given? end |
Instance Attribute Details
#desc ⇒ Boolean
Returns if descending order should be applied.
1081 1082 1083 |
# File 'lib/couchbase/search_options.rb', line 1081 def desc @desc end |
#field ⇒ String (readonly)
Returns name of the field to sort by.
1078 1079 1080 |
# File 'lib/couchbase/search_options.rb', line 1078 def field @field end |
#latitude ⇒ Float (readonly)
1087 1088 1089 |
# File 'lib/couchbase/search_options.rb', line 1087 def latitude @latitude end |
#longitude ⇒ Float (readonly)
1084 1085 1086 |
# File 'lib/couchbase/search_options.rb', line 1084 def longitude @longitude end |
#unit ⇒ :meters, ...
1090 1091 1092 |
# File 'lib/couchbase/search_options.rb', line 1090 def unit @unit end |