Reference documentation and code samples for the Vertex AI V1 API class Google::Cloud::AIPlatform::V1::NearestNeighborQuery.
A query to find a number of similar entities.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#embedding
def embedding() -> ::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::Embedding
-
(::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::Embedding) — Optional. The embedding vector that be used for similar search.
Note: The following fields are mutually exclusive:
embedding
,entity_id
. If a field in that set is populated, all other fields in the set will automatically be cleared.
#embedding=
def embedding=(value) -> ::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::Embedding
-
value (::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::Embedding) — Optional. The embedding vector that be used for similar search.
Note: The following fields are mutually exclusive:
embedding
,entity_id
. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::Embedding) — Optional. The embedding vector that be used for similar search.
Note: The following fields are mutually exclusive:
embedding
,entity_id
. If a field in that set is populated, all other fields in the set will automatically be cleared.
#entity_id
def entity_id() -> ::String
-
(::String) — Optional. The entity id whose similar entities should be searched for.
If embedding is set, search will use embedding instead of
entity_id.
Note: The following fields are mutually exclusive:
entity_id
,embedding
. If a field in that set is populated, all other fields in the set will automatically be cleared.
#entity_id=
def entity_id=(value) -> ::String
-
value (::String) — Optional. The entity id whose similar entities should be searched for.
If embedding is set, search will use embedding instead of
entity_id.
Note: The following fields are mutually exclusive:
entity_id
,embedding
. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::String) — Optional. The entity id whose similar entities should be searched for.
If embedding is set, search will use embedding instead of
entity_id.
Note: The following fields are mutually exclusive:
entity_id
,embedding
. If a field in that set is populated, all other fields in the set will automatically be cleared.
#neighbor_count
def neighbor_count() -> ::Integer
- (::Integer) — Optional. The number of similar entities to be retrieved from feature view for each query.
#neighbor_count=
def neighbor_count=(value) -> ::Integer
- value (::Integer) — Optional. The number of similar entities to be retrieved from feature view for each query.
- (::Integer) — Optional. The number of similar entities to be retrieved from feature view for each query.
#numeric_filters
def numeric_filters() -> ::Array<::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::NumericFilter>
- (::Array<::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::NumericFilter>) — Optional. The list of numeric filters.
#numeric_filters=
def numeric_filters=(value) -> ::Array<::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::NumericFilter>
- value (::Array<::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::NumericFilter>) — Optional. The list of numeric filters.
- (::Array<::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::NumericFilter>) — Optional. The list of numeric filters.
#parameters
def parameters() -> ::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::Parameters
- (::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::Parameters) — Optional. Parameters that can be set to tune query on the fly.
#parameters=
def parameters=(value) -> ::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::Parameters
- value (::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::Parameters) — Optional. Parameters that can be set to tune query on the fly.
- (::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::Parameters) — Optional. Parameters that can be set to tune query on the fly.
#per_crowding_attribute_neighbor_count
def per_crowding_attribute_neighbor_count() -> ::Integer
- (::Integer) — Optional. Crowding is a constraint on a neighbor list produced by nearest neighbor search requiring that no more than sper_crowding_attribute_neighbor_count of the k neighbors returned have the same value of crowding_attribute. It's used for improving result diversity.
#per_crowding_attribute_neighbor_count=
def per_crowding_attribute_neighbor_count=(value) -> ::Integer
- value (::Integer) — Optional. Crowding is a constraint on a neighbor list produced by nearest neighbor search requiring that no more than sper_crowding_attribute_neighbor_count of the k neighbors returned have the same value of crowding_attribute. It's used for improving result diversity.
- (::Integer) — Optional. Crowding is a constraint on a neighbor list produced by nearest neighbor search requiring that no more than sper_crowding_attribute_neighbor_count of the k neighbors returned have the same value of crowding_attribute. It's used for improving result diversity.
#string_filters
def string_filters() -> ::Array<::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::StringFilter>
- (::Array<::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::StringFilter>) — Optional. The list of string filters.
#string_filters=
def string_filters=(value) -> ::Array<::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::StringFilter>
- value (::Array<::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::StringFilter>) — Optional. The list of string filters.
- (::Array<::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::StringFilter>) — Optional. The list of string filters.