Class: Couchbase::Cluster::SearchQuery::DocIdQuery
- Inherits:
-
Couchbase::Cluster::SearchQuery
- Object
- Couchbase::Cluster::SearchQuery
- Couchbase::Cluster::SearchQuery::DocIdQuery
- Defined in:
- lib/couchbase/search_options.rb,
/Users/sergey.auseyau/code/couchbase-ruby-client/lib/couchbase/search_options.rb more...
Overview
Allows to restrict matches to a set of specific documents.
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(*doc_ids) {|self| ... } ⇒ DocIdQuery
constructor
A new instance of DocIdQuery.
- #to_h ⇒ Hash<Symbol, #to_json>
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, #to_json, wildcard
Constructor Details
#initialize(*doc_ids) {|self| ... } ⇒ DocIdQuery
Returns a new instance of DocIdQuery.
242 243 244 245 246 |
# File 'lib/couchbase/search_options.rb', line 242 def initialize(*doc_ids) super() @doc_ids = doc_ids yield self if block_given? end |
Instance Attribute Details
#boost ⇒ Float
237 238 239 |
# File 'lib/couchbase/search_options.rb', line 237 def boost @boost end |
Instance Method Details
#to_h ⇒ Hash<Symbol, #to_json>
249 250 251 252 253 |
# File 'lib/couchbase/search_options.rb', line 249 def to_h data = {:ids => @doc_ids.flatten.uniq} data[:boost] = boost if boost data end |