Class: Couchbase::Cluster::SearchQuery::MatchNoneQuery

Inherits:
Couchbase::Cluster::SearchQuery show all
Defined in:
lib/couchbase/search_options.rb,
/Users/sergey.auseyau/code/couchbase-ruby-client/lib/couchbase/search_options.rb
more...

Overview

A query that matches nothing.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Couchbase::Cluster::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, wildcard

Constructor Details

#initialize {|self| ... } ⇒ MatchNoneQuery

Returns a new instance of MatchNoneQuery.

Yield Parameters:

[View source]

1053
1054
1055
1056
# File 'lib/couchbase/search_options.rb', line 1053

def initialize
  super()
  yield self if block_given?
end

Instance Attribute Details

#boostFloat

Returns:

  • (Float)

1047
1048
1049
# File 'lib/couchbase/search_options.rb', line 1047

def boost
  @boost
end

#operatornil, ...

Returns:

  • (nil, :or, :and)

1050
1051
1052
# File 'lib/couchbase/search_options.rb', line 1050

def operator
  @operator
end

Instance Method Details

#to_json(*args) ⇒ String

Returns:

  • (String)
[View source]

1059
1060
1061
1062
1063
1064
# File 'lib/couchbase/search_options.rb', line 1059

def to_json(*args)
  data = {"match_none" => nil}
  data["boost"] = boost if boost
  data["operator"] = operator.to_s if operator
  data.to_json(*args)
end