Class: Couchbase::SearchQuery
- Inherits:
-
Object
- Object
- Couchbase::SearchQuery
- Defined in:
- lib/couchbase/search_options.rb,
/code/couchbase-ruby-client/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
324 325 326 |
# File 'lib/couchbase/search_options.rb', line 324 def self.boolean_field(value) BooleanFieldQuery.new(value) end |
.booleans {|query| ... } ⇒ BooleanQuery
Prepare BooleanQuery body
822 823 824 |
# File 'lib/couchbase/search_options.rb', line 822 def self.booleans(&) BooleanQuery.new(&) end |
.conjuncts {|query| ... } ⇒ ConjunctionQuery
Prepare ConjunctionQuery body
730 731 732 |
# File 'lib/couchbase/search_options.rb', line 730 def self.conjuncts(...) ConjunctionQuery.new(...) end |
.date_range {|query| ... } ⇒ DateRangeQuery
Prepare DateRangeQuery body
359 360 361 |
# File 'lib/couchbase/search_options.rb', line 359 def self.date_range(&) DateRangeQuery.new(&) end |
.disjuncts {|query| ... } ⇒ DisjunctionQuery
Prepare ConjunctionQuery body
772 773 774 |
# File 'lib/couchbase/search_options.rb', line 772 def self.disjuncts(...) DisjunctionQuery.new(...) end |
.doc_id(*doc_ids) {|query| ... } ⇒ DocIdQuery
Prepare DocIdQuery body
292 293 294 |
# File 'lib/couchbase/search_options.rb', line 292 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
628 629 630 |
# File 'lib/couchbase/search_options.rb', line 628 def self.geo_bounding_box(top_left_longitude, top_left_latitude, bottom_right_longitude, bottom_right_latitude, &) GeoBoundingBoxQuery.new(top_left_longitude, top_left_latitude, bottom_right_longitude, bottom_right_latitude, &) end |
.geo_distance(longitude, latitude, distance) {|query| ... } ⇒ GeoDistanceQuery
Prepare GeoDistanceQuery body
582 583 584 |
# File 'lib/couchbase/search_options.rb', line 582 def self.geo_distance(longitude, latitude, distance, &) GeoDistanceQuery.new(longitude, latitude, distance, &) end |
.geo_polygon(coordinates) {|query| ... } ⇒ GeoPolygonQuery
Prepare GeoPolygonQuery body
693 694 695 |
# File 'lib/couchbase/search_options.rb', line 693 def self.geo_polygon(coordinates, &) GeoPolygonQuery.new(coordinates, &) end |
.match(match) {|query| ... } ⇒ MatchQuery
Prepare MatchQuery body
97 98 99 |
# File 'lib/couchbase/search_options.rb', line 97 def self.match(match, &) MatchQuery.new(match, &) end |
.match_all {|query| ... } ⇒ MatchAllQuery
Prepare MatchAllQuery body
1007 1008 1009 |
# File 'lib/couchbase/search_options.rb', line 1007 def self.match_all(&) MatchAllQuery.new(&) end |
.match_none {|query| ... } ⇒ MatchNoneQuery
Prepare MatchNoneQuery body
1030 1031 1032 |
# File 'lib/couchbase/search_options.rb', line 1030 def self.match_none(&) MatchNoneQuery.new(&) end |
.match_phrase(match_phrase) {|query| ... } ⇒ MatchPhraseQuery
Prepare MatchPhraseQuery body
148 149 150 |
# File 'lib/couchbase/search_options.rb', line 148 def self.match_phrase(match_phrase, &) MatchPhraseQuery.new(match_phrase, &) end |
.numeric_range {|query| ... } ⇒ NumericRangeQuery
Prepare NumericRangeQuery body
442 443 444 |
# File 'lib/couchbase/search_options.rb', line 442 def self.numeric_range(&) NumericRangeQuery.new(&) end |
.phrase ⇒ PhraseQuery
Prepare PhraseQuery body
Creates a new instances PhraseQuery passing all parameters into Couchbase::SearchQuery::PhraseQuery#initialize.
971 972 973 |
# File 'lib/couchbase/search_options.rb', line 971 def self.phrase(...) PhraseQuery.new(...) end |
.prefix(prefix) {|query| ... } ⇒ PrefixQuery
Prepare PrefixQuery body
933 934 935 |
# File 'lib/couchbase/search_options.rb', line 933 def self.prefix(prefix, &) PrefixQuery.new(prefix, &) end |
.query_string(query_string) {|query| ... } ⇒ QueryStringQuery
Prepare QueryStringQuery body
224 225 226 |
# File 'lib/couchbase/search_options.rb', line 224 def self.query_string(query_string, &) QueryStringQuery.new(query_string, &) end |
.regexp(regexp) {|query| ... } ⇒ RegexpQuery
Prepare RegexpQuery body
188 189 190 |
# File 'lib/couchbase/search_options.rb', line 188 def self.regexp(regexp, &) RegexpQuery.new(regexp, &) end |
.term(term) {|query| ... } ⇒ TermQuery
Prepare TermQuery body
886 887 888 |
# File 'lib/couchbase/search_options.rb', line 886 def self.term(term, &) TermQuery.new(term, &) end |
.term_range {|query| ... } ⇒ TermRangeQuery
Prepare TermRangeQuery body
510 511 512 |
# File 'lib/couchbase/search_options.rb', line 510 def self.term_range(&) TermRangeQuery.new(&) end |
.wildcard(wildcard) {|query| ... } ⇒ WildcardQuery
Prepare WildcardQuery body
256 257 258 |
# File 'lib/couchbase/search_options.rb', line 256 def self.wildcard(wildcard, &) WildcardQuery.new(wildcard, &) end |
Instance Method Details
#to_h ⇒ Hash<Symbol, #to_json>
82 83 84 |
# File 'lib/couchbase/search_options.rb', line 82 def to_h {} end |
#to_json(*args) ⇒ String
87 88 89 |
# File 'lib/couchbase/search_options.rb', line 87 def to_json(*args) to_h.to_json(*args) end |