Class: Couchbase::VectorSearch
- Inherits:
-
Object
- Object
- Couchbase::VectorSearch
- Defined in:
- lib/couchbase/search_options.rb
Instance Method Summary collapse
-
#initialize(vector_queries, options = Options::VectorSearch::DEFAULT) ⇒ VectorSearch
constructor
Constructs a
VectorSearch
instance, which allows one or more individual vector queries to be executed. - #to_backend ⇒ Object private
Constructor Details
#initialize(vector_queries, options = Options::VectorSearch::DEFAULT) ⇒ VectorSearch
Constructs a VectorSearch
instance, which allows one or more individual vector queries to be executed.
1050 1051 1052 1053 |
# File 'lib/couchbase/search_options.rb', line 1050 def initialize(vector_queries, = Options::VectorSearch::DEFAULT) @vector_queries = vector_queries.respond_to?(:each) ? vector_queries : [vector_queries] @options = end |
Instance Method Details
#to_backend ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1056 1057 1058 |
# File 'lib/couchbase/search_options.rb', line 1056 def to_backend {vector_queries: @vector_queries.map(&:to_h).to_json}.merge(@options.to_backend) end |