Class: Couchbase::SearchQuery
- Inherits:
-
Object
- Object
- Couchbase::SearchQuery
- Defined in:
- lib/couchbase/search_options.rb
Direct Known Subclasses
BooleanFieldQuery, BooleanQuery, ConjunctionQuery, DateRangeQuery, DisjunctionQuery, DocIdQuery, GeoBoundingBoxQuery, GeoDistanceQuery, GeoPolygonQuery, MatchAllQuery, MatchNoneQuery, MatchPhraseQuery, MatchQuery, NumericRangeQuery, PhraseQuery, PrefixQuery, QueryStringQuery, RegexpQuery, TermQuery, TermRangeQuery, WildcardQuery
Defined Under Namespace
Classes: BooleanFieldQuery, BooleanQuery, ConjunctionQuery, Coordinate, DateRangeQuery, DisjunctionQuery, DocIdQuery, GeoBoundingBoxQuery, GeoDistanceQuery, GeoPolygonQuery, MatchAllQuery, MatchNoneQuery, MatchPhraseQuery, MatchQuery, NumericRangeQuery, PhraseQuery, PrefixQuery, QueryStringQuery, RegexpQuery, TermQuery, TermRangeQuery, WildcardQuery
Class Method Summary collapse
-
.boolean_field(value) {|query| ... } ⇒ BooleanFieldQuery
Prepare BooleanFieldQuery body.
-
.booleans {|query| ... } ⇒ BooleanQuery
Prepare BooleanQuery body.
-
.conjuncts {|query| ... } ⇒ ConjunctionQuery
Prepare ConjunctionQuery body.
-
.date_range {|query| ... } ⇒ DateRangeQuery
Prepare DateRangeQuery body.
-
.disjuncts {|query| ... } ⇒ DisjunctionQuery
Prepare ConjunctionQuery body.
-
.doc_id(*doc_ids) {|query| ... } ⇒ DocIdQuery
Prepare DocIdQuery body.
-
.geo_bounding_box(top_left_longitude, top_left_latitude, bottom_right_longitude, bottom_right_latitude) {|query| ... } ⇒ GeoBoundingBoxQuery
Prepare GeoBoundingBoxQuery body.
-
.geo_distance(longitude, latitude, distance) {|query| ... } ⇒ GeoDistanceQuery
Prepare GeoDistanceQuery body.
-
.geo_polygon(coordinates) {|query| ... } ⇒ GeoPolygonQuery
Prepare GeoPolygonQuery body.
-
.match(match) {|query| ... } ⇒ MatchQuery
Prepare MatchQuery body.
-
.match_all {|query| ... } ⇒ MatchAllQuery
Prepare MatchAllQuery body.
-
.match_none {|query| ... } ⇒ MatchNoneQuery
Prepare MatchNoneQuery body.
-
.match_phrase(match_phrase) {|query| ... } ⇒ MatchPhraseQuery
Prepare MatchPhraseQuery body.
-
.numeric_range {|query| ... } ⇒ NumericRangeQuery
Prepare NumericRangeQuery body.
-
.phrase ⇒ PhraseQuery
Prepare PhraseQuery body.
-
.prefix(prefix) {|query| ... } ⇒ PrefixQuery
Prepare PrefixQuery body.
-
.query_string(query_string) {|query| ... } ⇒ QueryStringQuery
Prepare QueryStringQuery body.
-
.regexp(regexp) {|query| ... } ⇒ RegexpQuery
Prepare RegexpQuery body.
-
.term(term) {|query| ... } ⇒ TermQuery
Prepare TermQuery body.
-
.term_range {|query| ... } ⇒ TermRangeQuery
Prepare TermRangeQuery body.
-
.wildcard(wildcard) {|query| ... } ⇒ WildcardQuery
Prepare WildcardQuery body.
Instance Method Summary collapse
Class Method Details
.boolean_field(value) {|query| ... } ⇒ BooleanFieldQuery
Prepare BooleanFieldQuery body
322 323 324 |
# File 'lib/couchbase/search_options.rb', line 322 def self.boolean_field(value) BooleanFieldQuery.new(value) end |
.booleans {|query| ... } ⇒ BooleanQuery
Prepare BooleanQuery body
820 821 822 |
# File 'lib/couchbase/search_options.rb', line 820 def self.booleans(&block) BooleanQuery.new(&block) end |
.conjuncts {|query| ... } ⇒ ConjunctionQuery
Prepare ConjunctionQuery body
728 729 730 |
# File 'lib/couchbase/search_options.rb', line 728 def self.conjuncts(...) ConjunctionQuery.new(...) end |
.date_range {|query| ... } ⇒ DateRangeQuery
Prepare DateRangeQuery body
357 358 359 |
# File 'lib/couchbase/search_options.rb', line 357 def self.date_range(&block) DateRangeQuery.new(&block) end |
.disjuncts {|query| ... } ⇒ DisjunctionQuery
Prepare ConjunctionQuery body
770 771 772 |
# File 'lib/couchbase/search_options.rb', line 770 def self.disjuncts(...) DisjunctionQuery.new(...) end |
.doc_id(*doc_ids) {|query| ... } ⇒ DocIdQuery
Prepare DocIdQuery body
290 291 292 |
# File 'lib/couchbase/search_options.rb', line 290 def self.doc_id(*doc_ids) DocIdQuery.new(*doc_ids) end |
.geo_bounding_box(top_left_longitude, top_left_latitude, bottom_right_longitude, bottom_right_latitude) {|query| ... } ⇒ GeoBoundingBoxQuery
Prepare GeoBoundingBoxQuery body
626 627 628 |
# File 'lib/couchbase/search_options.rb', line 626 def self.geo_bounding_box(top_left_longitude, top_left_latitude, bottom_right_longitude, bottom_right_latitude, &block) GeoBoundingBoxQuery.new(top_left_longitude, top_left_latitude, bottom_right_longitude, bottom_right_latitude, &block) end |
.geo_distance(longitude, latitude, distance) {|query| ... } ⇒ GeoDistanceQuery
Prepare GeoDistanceQuery body
580 581 582 |
# File 'lib/couchbase/search_options.rb', line 580 def self.geo_distance(longitude, latitude, distance, &block) GeoDistanceQuery.new(longitude, latitude, distance, &block) end |
.geo_polygon(coordinates) {|query| ... } ⇒ GeoPolygonQuery
Prepare GeoPolygonQuery body
691 692 693 |
# File 'lib/couchbase/search_options.rb', line 691 def self.geo_polygon(coordinates, &block) GeoPolygonQuery.new(coordinates, &block) end |
.match(match) {|query| ... } ⇒ MatchQuery
Prepare MatchQuery body
95 96 97 |
# File 'lib/couchbase/search_options.rb', line 95 def self.match(match, &block) MatchQuery.new(match, &block) end |
.match_all {|query| ... } ⇒ MatchAllQuery
Prepare MatchAllQuery body
1002 1003 1004 |
# File 'lib/couchbase/search_options.rb', line 1002 def self.match_all(&block) MatchAllQuery.new(&block) end |
.match_none {|query| ... } ⇒ MatchNoneQuery
Prepare MatchNoneQuery body
1025 1026 1027 |
# File 'lib/couchbase/search_options.rb', line 1025 def self.match_none(&block) MatchNoneQuery.new(&block) end |
.match_phrase(match_phrase) {|query| ... } ⇒ MatchPhraseQuery
Prepare MatchPhraseQuery body
146 147 148 |
# File 'lib/couchbase/search_options.rb', line 146 def self.match_phrase(match_phrase, &block) MatchPhraseQuery.new(match_phrase, &block) end |
.numeric_range {|query| ... } ⇒ NumericRangeQuery
Prepare NumericRangeQuery body
440 441 442 |
# File 'lib/couchbase/search_options.rb', line 440 def self.numeric_range(&block) NumericRangeQuery.new(&block) end |
.phrase ⇒ PhraseQuery
Prepare PhraseQuery body
Creates a new instances PhraseQuery passing all parameters into Couchbase::SearchQuery::PhraseQuery#initialize.
966 967 968 |
# File 'lib/couchbase/search_options.rb', line 966 def self.phrase(...) PhraseQuery.new(...) end |
.prefix(prefix) {|query| ... } ⇒ PrefixQuery
Prepare PrefixQuery body
928 929 930 |
# File 'lib/couchbase/search_options.rb', line 928 def self.prefix(prefix, &block) PrefixQuery.new(prefix, &block) end |
.query_string(query_string) {|query| ... } ⇒ QueryStringQuery
Prepare QueryStringQuery body
222 223 224 |
# File 'lib/couchbase/search_options.rb', line 222 def self.query_string(query_string, &block) QueryStringQuery.new(query_string, &block) end |
.regexp(regexp) {|query| ... } ⇒ RegexpQuery
Prepare RegexpQuery body
186 187 188 |
# File 'lib/couchbase/search_options.rb', line 186 def self.regexp(regexp, &block) RegexpQuery.new(regexp, &block) end |
.term(term) {|query| ... } ⇒ TermQuery
Prepare TermQuery body
881 882 883 |
# File 'lib/couchbase/search_options.rb', line 881 def self.term(term, &block) TermQuery.new(term, &block) end |
.term_range {|query| ... } ⇒ TermRangeQuery
Prepare TermRangeQuery body
508 509 510 |
# File 'lib/couchbase/search_options.rb', line 508 def self.term_range(&block) TermRangeQuery.new(&block) end |
.wildcard(wildcard) {|query| ... } ⇒ WildcardQuery
Prepare WildcardQuery body
254 255 256 |
# File 'lib/couchbase/search_options.rb', line 254 def self.wildcard(wildcard, &block) WildcardQuery.new(wildcard, &block) end |
Instance Method Details
#to_h ⇒ Hash<Symbol, #to_json>
80 81 82 |
# File 'lib/couchbase/search_options.rb', line 80 def to_h {} end |
#to_json(*args) ⇒ String
85 86 87 |
# File 'lib/couchbase/search_options.rb', line 85 def to_json(*args) to_h.to_json(*args) end |