Reference documentation and code samples for the Cloud Firestore V1 API class Google::Cloud::Firestore::V1::StructuredQuery::FindNearest.
Nearest Neighbors search config.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#distance_measure
def distance_measure() -> ::Google::Cloud::Firestore::V1::StructuredQuery::FindNearest::DistanceMeasure
Returns
- (::Google::Cloud::Firestore::V1::StructuredQuery::FindNearest::DistanceMeasure) — Required. The Distance Measure to use, required.
#distance_measure=
def distance_measure=(value) -> ::Google::Cloud::Firestore::V1::StructuredQuery::FindNearest::DistanceMeasure
Parameter
- value (::Google::Cloud::Firestore::V1::StructuredQuery::FindNearest::DistanceMeasure) — Required. The Distance Measure to use, required.
Returns
- (::Google::Cloud::Firestore::V1::StructuredQuery::FindNearest::DistanceMeasure) — Required. The Distance Measure to use, required.
#limit
def limit() -> ::Google::Protobuf::Int32Value
Returns
- (::Google::Protobuf::Int32Value) — Required. The number of nearest neighbors to return. Must be a positive integer of no more than 1000.
#limit=
def limit=(value) -> ::Google::Protobuf::Int32Value
Parameter
- value (::Google::Protobuf::Int32Value) — Required. The number of nearest neighbors to return. Must be a positive integer of no more than 1000.
Returns
- (::Google::Protobuf::Int32Value) — Required. The number of nearest neighbors to return. Must be a positive integer of no more than 1000.
#query_vector
def query_vector() -> ::Google::Cloud::Firestore::V1::Value
Returns
- (::Google::Cloud::Firestore::V1::Value) — Required. The query vector that we are searching on. Must be a vector of no more than 2048 dimensions.
#query_vector=
def query_vector=(value) -> ::Google::Cloud::Firestore::V1::Value
Parameter
- value (::Google::Cloud::Firestore::V1::Value) — Required. The query vector that we are searching on. Must be a vector of no more than 2048 dimensions.
Returns
- (::Google::Cloud::Firestore::V1::Value) — Required. The query vector that we are searching on. Must be a vector of no more than 2048 dimensions.
#vector_field
def vector_field() -> ::Google::Cloud::Firestore::V1::StructuredQuery::FieldReference
Returns
- (::Google::Cloud::Firestore::V1::StructuredQuery::FieldReference) — Required. An indexed vector field to search upon. Only documents which contain vectors whose dimensionality match the query_vector can be returned.
#vector_field=
def vector_field=(value) -> ::Google::Cloud::Firestore::V1::StructuredQuery::FieldReference
Parameter
- value (::Google::Cloud::Firestore::V1::StructuredQuery::FieldReference) — Required. An indexed vector field to search upon. Only documents which contain vectors whose dimensionality match the query_vector can be returned.
Returns
- (::Google::Cloud::Firestore::V1::StructuredQuery::FieldReference) — Required. An indexed vector field to search upon. Only documents which contain vectors whose dimensionality match the query_vector can be returned.