Class: Couchbase::Cluster::SearchQuery::GeoBoundingBoxQuery
- Inherits:
-
Couchbase::Cluster::SearchQuery
- Object
- Couchbase::Cluster::SearchQuery
- Couchbase::Cluster::SearchQuery::GeoBoundingBoxQuery
- Defined in:
- lib/couchbase/search_options.rb,
/Users/sergey.auseyau/code/couchbase-ruby-client/lib/couchbase/search_options.rb more...
Overview
Finds ‘geopoint` indexed matches in a given bounding box.
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(top_left_longitude, top_left_latitude, bottom_right_longitude, bottom_right_latitude) {|self| ... } ⇒ GeoBoundingBoxQuery
constructor
A new instance of GeoBoundingBoxQuery.
- #to_h ⇒ Hash<Symbol, #to_json>
Methods inherited from Couchbase::Cluster::SearchQuery
boolean_field, booleans, conjuncts, date_range, disjuncts, doc_id, geo_bounding_box, geo_distance, geo_polygon, match, match_all, match_none, match_phrase, numeric_range, phrase, prefix, query_string, regexp, term, term_range, #to_json, wildcard
Constructor Details
#initialize(top_left_longitude, top_left_latitude, bottom_right_longitude, bottom_right_latitude) {|self| ... } ⇒ GeoBoundingBoxQuery
Returns a new instance of GeoBoundingBoxQuery.
584 585 586 587 588 589 590 591 |
# File 'lib/couchbase/search_options.rb', line 584 def initialize(top_left_longitude, top_left_latitude, bottom_right_longitude, bottom_right_latitude) super() @top_left_longitude = top_left_longitude @top_left_latitude = top_left_latitude @bottom_right_longitude = bottom_right_longitude @bottom_right_latitude = bottom_right_latitude yield self if block_given? end |
Instance Attribute Details
#boost ⇒ Float
573 574 575 |
# File 'lib/couchbase/search_options.rb', line 573 def boost @boost end |
#field ⇒ String
576 577 578 |
# File 'lib/couchbase/search_options.rb', line 576 def field @field end |
Instance Method Details
#to_h ⇒ Hash<Symbol, #to_json>
594 595 596 597 598 599 600 601 602 |
# File 'lib/couchbase/search_options.rb', line 594 def to_h data = { :top_left => [@top_left_longitude, @top_left_latitude], :bottom_right => [@bottom_right_longitude, @bottom_right_latitude], } data[:boost] = boost if boost data[:field] = field if field data end |