Class: Couchbase::SearchQuery::QueryStringQuery
- Inherits:
-
Couchbase::SearchQuery
- Object
- Couchbase::SearchQuery
- Couchbase::SearchQuery::QueryStringQuery
- Defined in:
- lib/couchbase/search_options.rb,
/code/couchbase-ruby-client/lib/couchbase/search_options.rb
Overview
The query string query allows humans to describe complex queries using a simple syntax.
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(query_string) {|self| ... } ⇒ QueryStringQuery
constructor
A new instance of QueryStringQuery.
- #to_h ⇒ Hash<Symbol, #to_json>
Methods inherited from Couchbase::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(query_string) {|self| ... } ⇒ QueryStringQuery
Returns a new instance of QueryStringQuery.
236 237 238 239 240 |
# File 'lib/couchbase/search_options.rb', line 236 def initialize(query_string) super() @query_string = query_string yield self if block_given? end |
Instance Attribute Details
#boost ⇒ Float
231 232 233 |
# File 'lib/couchbase/search_options.rb', line 231 def boost @boost end |
Instance Method Details
#to_h ⇒ Hash<Symbol, #to_json>
243 244 245 246 247 |
# File 'lib/couchbase/search_options.rb', line 243 def to_h data = {:query => @query_string} data[:boost] = boost if boost data end |