Cloud AI Platform v1 API - Class NearestNeighborQuery (2.27.0)

public sealed class NearestNeighborQuery : IMessage<NearestNeighborQuery>, IEquatable<NearestNeighborQuery>, IDeepCloneable<NearestNeighborQuery>, IBufferMessage, IMessage

Reference documentation and code samples for the Cloud AI Platform v1 API class NearestNeighborQuery.

A query to find a number of similar entities.

Inheritance

object > NearestNeighborQuery

Namespace

Google.Cloud.AIPlatform.V1

Assembly

Google.Cloud.AIPlatform.V1.dll

Constructors

NearestNeighborQuery()

public NearestNeighborQuery()

NearestNeighborQuery(NearestNeighborQuery)

public NearestNeighborQuery(NearestNeighborQuery other)
Parameter
NameDescription
otherNearestNeighborQuery

Properties

Embedding

public NearestNeighborQuery.Types.Embedding Embedding { get; set; }

Optional. The embedding vector that be used for similar search.

Property Value
TypeDescription
NearestNeighborQueryTypesEmbedding

EntityId

public string EntityId { get; set; }

Optional. The entity id whose similar entities should be searched for. If embedding is set, search will use embedding instead of entity_id.

Property Value
TypeDescription
string

HasEntityId

public bool HasEntityId { get; }

Gets whether the "entity_id" field is set

Property Value
TypeDescription
bool

InstanceCase

public NearestNeighborQuery.InstanceOneofCase InstanceCase { get; }
Property Value
TypeDescription
NearestNeighborQueryInstanceOneofCase

NeighborCount

public int NeighborCount { get; set; }

Optional. The number of similar entities to be retrieved from feature view for each query.

Property Value
TypeDescription
int

Parameters

public NearestNeighborQuery.Types.Parameters Parameters { get; set; }

Optional. Parameters that can be set to tune query on the fly.

Property Value
TypeDescription
NearestNeighborQueryTypesParameters

PerCrowdingAttributeNeighborCount

public int PerCrowdingAttributeNeighborCount { get; set; }

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.

Property Value
TypeDescription
int

StringFilters

public RepeatedField<NearestNeighborQuery.Types.StringFilter> StringFilters { get; }

Optional. The list of string filters.

Property Value
TypeDescription
RepeatedFieldNearestNeighborQueryTypesStringFilter