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

Inherits:
Couchbase::Cluster::SearchQuery show all
Defined in:
lib/couchbase/search_options.rb

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:



971
972
973
974
# File 'lib/couchbase/search_options.rb', line 971

def initialize
  super()
  yield self if block_given?
end

Instance Attribute Details

#boostFloat

Returns:

  • (Float)


968
969
970
# File 'lib/couchbase/search_options.rb', line 968

def boost
  @boost
end

Instance Method Details

#to_json(*args) ⇒ String

Returns:

  • (String)


977
978
979
980
981
# File 'lib/couchbase/search_options.rb', line 977

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