Class: Couchbase::VectorQuery

Inherits:
Object
  • Object
show all
Defined in:
lib/couchbase/search_options.rb

Overview

Stability:

  • Uncommitted: This API may change in the future.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(vector_field_name, vector_query) {|self| ... } ⇒ VectorQuery

Constructs a VectorQuery instance

Parameters:

  • vector_field_name (String)

    the document field that contains the vector.

  • vector_query (Array<Float>)

    the vector query to run.

Yield Parameters:

  • self (MatchPhraseQuery)

Stability:

  • Uncommitted: This API may change in the future.



1075
1076
1077
1078
1079
1080
# File 'lib/couchbase/search_options.rb', line 1075

def initialize(vector_field_name, vector_query)
  @vector_field_name = vector_field_name
  @vector_query = vector_query

  yield self if block_given?
end

Instance Attribute Details

#boostFloat?

Returns:

  • (Float, nil)

Stability:

  • Uncommitted: This API may change in the future.



1067
1068
1069
# File 'lib/couchbase/search_options.rb', line 1067

def boost
  @boost
end

#num_candidatesInteger?

Returns:

  • (Integer, nil)

Stability:

  • Uncommitted: This API may change in the future.



1064
1065
1066
# File 'lib/couchbase/search_options.rb', line 1064

def num_candidates
  @num_candidates
end