Class: Couchbase::Cluster::SearchQuery::BooleanFieldQuery
Overview
Allow to match ‘true`/`false` in a field mapped as boolean.
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(value) {|self| ... } ⇒ BooleanFieldQuery
Returns a new instance of BooleanFieldQuery.
[View source]
294
295
296
297
298
|
# File 'lib/couchbase/search_options.rb', line 294
def initialize(value)
super()
@value = value
yield self if block_given?
end
|
Instance Attribute Details
#boost ⇒ Float
283
284
285
|
# File 'lib/couchbase/search_options.rb', line 283
def boost
@boost
end
|
#field ⇒ String
289
290
291
|
# File 'lib/couchbase/search_options.rb', line 289
def field
@field
end
|
#operator ⇒ nil, ...
286
287
288
|
# File 'lib/couchbase/search_options.rb', line 286
def operator
@operator
end
|
Instance Method Details
#to_json(*args) ⇒ String
[View source]
301
302
303
304
305
306
307
|
# File 'lib/couchbase/search_options.rb', line 301
def to_json(*args)
data = {"bool" => @value}
data["boost"] = boost if boost
data["operator"] = operator.to_s if operator
data["field"] = field if field
data.to_json(*args)
end
|