Class: Couchbase::Cluster::SearchQuery::GeoBoundingBoxQuery
Overview
Finds ‘geopoint` indexed matches in a given bounding box.
Instance Attribute Summary collapse
Instance Method Summary
collapse
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, wildcard
Constructor Details
#initialize(top_left_longitude, top_left_latitude, bottom_right_longitude, bottom_right_latitude) {|self| ... } ⇒ GeoBoundingBoxQuery
Returns a new instance of GeoBoundingBoxQuery.
[View source]
621
622
623
624
625
626
627
628
|
# File 'lib/couchbase/search_options.rb', line 621
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
607
608
609
|
# File 'lib/couchbase/search_options.rb', line 607
def boost
@boost
end
|
#field ⇒ String
613
614
615
|
# File 'lib/couchbase/search_options.rb', line 613
def field
@field
end
|
#operator ⇒ nil, ...
610
611
612
|
# File 'lib/couchbase/search_options.rb', line 610
def operator
@operator
end
|
Instance Method Details
#to_json(*args) ⇒ String
[View source]
631
632
633
634
635
636
637
638
639
640
|
# File 'lib/couchbase/search_options.rb', line 631
def to_json(*args)
data = {
"top_left" => [@top_left_longitude, @top_left_latitude],
"bottom_right" => [@bottom_right_longitude, @bottom_right_latitude],
}
data["boost"] = boost if boost
data["operator"] = operator.to_s if operator
data["field"] = field if field
data.to_json(*args)
end
|