Class: Google::Apis::FirestoreV1::FindNearest
- Inherits:
-
Object
- Object
- Google::Apis::FirestoreV1::FindNearest
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/firestore_v1/classes.rb,
lib/google/apis/firestore_v1/representations.rb,
lib/google/apis/firestore_v1/representations.rb
Overview
Nearest Neighbors search config.
Instance Attribute Summary collapse
-
#distance_measure ⇒ String
Required.
-
#limit ⇒ Fixnum
Required.
-
#query_vector ⇒ Google::Apis::FirestoreV1::Value
A message that can hold any of the supported value types.
-
#vector_field ⇒ Google::Apis::FirestoreV1::FieldReference
A reference to a field in a document, ex:
stats.operations.
Instance Method Summary collapse
-
#initialize(**args) ⇒ FindNearest
constructor
A new instance of FindNearest.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ FindNearest
Returns a new instance of FindNearest.
1128 1129 1130 |
# File 'lib/google/apis/firestore_v1/classes.rb', line 1128 def initialize(**args) update!(**args) end |
Instance Attribute Details
#distance_measure ⇒ String
Required. The distance measure to use, required.
Corresponds to the JSON property distanceMeasure
1110 1111 1112 |
# File 'lib/google/apis/firestore_v1/classes.rb', line 1110 def distance_measure @distance_measure end |
#limit ⇒ Fixnum
Required. The number of nearest neighbors to return. Must be a positive
integer of no more than 1000.
Corresponds to the JSON property limit
1116 1117 1118 |
# File 'lib/google/apis/firestore_v1/classes.rb', line 1116 def limit @limit end |
#query_vector ⇒ Google::Apis::FirestoreV1::Value
A message that can hold any of the supported value types.
Corresponds to the JSON property queryVector
1121 1122 1123 |
# File 'lib/google/apis/firestore_v1/classes.rb', line 1121 def query_vector @query_vector end |
#vector_field ⇒ Google::Apis::FirestoreV1::FieldReference
A reference to a field in a document, ex: stats.operations.
Corresponds to the JSON property vectorField
1126 1127 1128 |
# File 'lib/google/apis/firestore_v1/classes.rb', line 1126 def vector_field @vector_field end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1133 1134 1135 1136 1137 1138 |
# File 'lib/google/apis/firestore_v1/classes.rb', line 1133 def update!(**args) @distance_measure = args[:distance_measure] if args.key?(:distance_measure) @limit = args[:limit] if args.key?(:limit) @query_vector = args[:query_vector] if args.key?(:query_vector) @vector_field = args[:vector_field] if args.key?(:vector_field) end |