public static final class FindNeighborsRequest.Query extends GeneratedMessageV3 implements FindNeighborsRequest.QueryOrBuilder
A query to find a number of the nearest neighbors (most similar vectors)
of a vector.
Protobuf type google.cloud.aiplatform.v1beta1.FindNeighborsRequest.Query
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
public static final int APPROXIMATE_NEIGHBOR_COUNT_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
public static final int DATAPOINT_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
public static final int FRACTION_LEAF_NODES_TO_SEARCH_OVERRIDE_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
public static final int NEIGHBOR_COUNT_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
public static final int PER_CROWDING_ATTRIBUTE_NEIGHBOR_COUNT_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
Static Methods
public static FindNeighborsRequest.Query getDefaultInstance()
public static final Descriptors.Descriptor getDescriptor()
public static FindNeighborsRequest.Query.Builder newBuilder()
public static FindNeighborsRequest.Query.Builder newBuilder(FindNeighborsRequest.Query prototype)
public static FindNeighborsRequest.Query parseDelimitedFrom(InputStream input)
public static FindNeighborsRequest.Query parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static FindNeighborsRequest.Query parseFrom(byte[] data)
Parameter |
---|
Name | Description |
data | byte[]
|
public static FindNeighborsRequest.Query parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static FindNeighborsRequest.Query parseFrom(ByteString data)
public static FindNeighborsRequest.Query parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static FindNeighborsRequest.Query parseFrom(CodedInputStream input)
public static FindNeighborsRequest.Query parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static FindNeighborsRequest.Query parseFrom(InputStream input)
public static FindNeighborsRequest.Query parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static FindNeighborsRequest.Query parseFrom(ByteBuffer data)
public static FindNeighborsRequest.Query parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Parser<FindNeighborsRequest.Query> parser()
Methods
public boolean equals(Object obj)
Parameter |
---|
Name | Description |
obj | Object
|
Overrides
public int getApproximateNeighborCount()
The number of neighbors to find via approximate search before
exact reordering is performed. If not set, the default value from scam
config is used; if set, this value must be > 0.
int32 approximate_neighbor_count = 4;
Returns |
---|
Type | Description |
int | The approximateNeighborCount.
|
public IndexDatapoint getDatapoint()
Required. The datapoint/vector whose nearest neighbors should be searched
for.
.google.cloud.aiplatform.v1beta1.IndexDatapoint datapoint = 1 [(.google.api.field_behavior) = REQUIRED];
public IndexDatapointOrBuilder getDatapointOrBuilder()
Required. The datapoint/vector whose nearest neighbors should be searched
for.
.google.cloud.aiplatform.v1beta1.IndexDatapoint datapoint = 1 [(.google.api.field_behavior) = REQUIRED];
public FindNeighborsRequest.Query getDefaultInstanceForType()
public double getFractionLeafNodesToSearchOverride()
The fraction of the number of leaves to search, set at query time allows
user to tune search performance. This value increase result in both
search accuracy and latency increase. The value should be between 0.0
and 1.0. If not set or set to 0.0, query uses the default value specified
in
NearestNeighborSearchConfig.TreeAHConfig.fraction_leaf_nodes_to_search.
double fraction_leaf_nodes_to_search_override = 5;
Returns |
---|
Type | Description |
double | The fractionLeafNodesToSearchOverride.
|
public int getNeighborCount()
Returns |
---|
Type | Description |
int | The neighborCount.
|
public Parser<FindNeighborsRequest.Query> getParserForType()
Overrides
public int getPerCrowdingAttributeNeighborCount()
Crowding is a constraint on a neighbor list produced by nearest neighbor
search requiring that no more than some value k' of the k neighbors
returned have the same value of crowding_attribute.
It's used for improving result diversity.
This field is the maximum number of matches with the same crowding tag.
int32 per_crowding_attribute_neighbor_count = 3;
Returns |
---|
Type | Description |
int | The perCrowdingAttributeNeighborCount.
|
public int getSerializedSize()
Returns |
---|
Type | Description |
int | |
Overrides
public boolean hasDatapoint()
Required. The datapoint/vector whose nearest neighbors should be searched
for.
.google.cloud.aiplatform.v1beta1.IndexDatapoint datapoint = 1 [(.google.api.field_behavior) = REQUIRED];
Returns |
---|
Type | Description |
boolean | Whether the datapoint field is set.
|
Returns |
---|
Type | Description |
int | |
Overrides
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
public final boolean isInitialized()
Overrides
public FindNeighborsRequest.Query.Builder newBuilderForType()
protected FindNeighborsRequest.Query.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Overrides
public FindNeighborsRequest.Query.Builder toBuilder()
public void writeTo(CodedOutputStream output)
Overrides