Class: Couchbase::SearchQuery::DocIdQuery
- Inherits:
-
SearchQuery
- Object
- SearchQuery
- Couchbase::SearchQuery::DocIdQuery
- Defined in:
- lib/couchbase/search_options.rb,
/home/runner/work/couchbase-ruby-client/couchbase-ruby-client/lib/couchbase/search_options.rb
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>
Constructor Details
#initialize(*doc_ids) {|self| ... } ⇒ DocIdQuery
Returns a new instance of DocIdQuery.
300 301 302 303 304 |
# File 'lib/couchbase/search_options.rb', line 300 def initialize(*doc_ids) super() @doc_ids = doc_ids yield self if block_given? end |
Instance Attribute Details
#boost ⇒ Float
295 296 297 |
# File 'lib/couchbase/search_options.rb', line 295 def boost @boost end |
Instance Method Details
#to_h ⇒ Hash<Symbol, #to_json>
307 308 309 310 311 |
# File 'lib/couchbase/search_options.rb', line 307 def to_h data = {:ids => @doc_ids.flatten.uniq} data[:boost] = boost if boost data end |