Package com.google.cloud.aiplatform.v1
Class NearestNeighborQuery
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.aiplatform.v1.NearestNeighborQuery
- All Implemented Interfaces:
NearestNeighborQueryOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
@Generated
public final class NearestNeighborQuery
extends com.google.protobuf.GeneratedMessage
implements NearestNeighborQueryOrBuilder
A query to find a number of similar entities.Protobuf type
google.cloud.aiplatform.v1.NearestNeighborQuery- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA query to find a number of similar entities.static final classThe embedding vector.static interfacestatic enumstatic final classNumeric filter is used to search a subset of the entities by using boolean rules on numeric columns.static interfacestatic final classParameters that can be overrided in each query to tune query latency and recall.static interfacestatic final classString filter is used to search a subset of the entities by using boolean rules on string columns.static interfaceNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic NearestNeighborQuerystatic final com.google.protobuf.Descriptors.DescriptorOptional.Optional.Optional.com.google.protobuf.ByteStringOptional.intOptional.getNumericFilters(int index) Optional.intOptional.Optional.getNumericFiltersOrBuilder(int index) Optional.List<? extends NearestNeighborQuery.NumericFilterOrBuilder>Optional.Optional.Optional.com.google.protobuf.Parser<NearestNeighborQuery>intOptional.intgetStringFilters(int index) Optional.intOptional.Optional.getStringFiltersOrBuilder(int index) Optional.List<? extends NearestNeighborQuery.StringFilterOrBuilder>Optional.booleanOptional.booleanOptional.inthashCode()booleanOptional.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic NearestNeighborQuery.Builderstatic NearestNeighborQuery.BuildernewBuilder(NearestNeighborQuery prototype) protected NearestNeighborQuery.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static NearestNeighborQueryparseDelimitedFrom(InputStream input) static NearestNeighborQueryparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static NearestNeighborQueryparseFrom(byte[] data) static NearestNeighborQueryparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static NearestNeighborQueryparseFrom(com.google.protobuf.ByteString data) static NearestNeighborQueryparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static NearestNeighborQueryparseFrom(com.google.protobuf.CodedInputStream input) static NearestNeighborQueryparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static NearestNeighborQueryparseFrom(InputStream input) static NearestNeighborQueryparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static NearestNeighborQueryparseFrom(ByteBuffer data) static NearestNeighborQueryparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<NearestNeighborQuery>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
ENTITY_ID_FIELD_NUMBER
public static final int ENTITY_ID_FIELD_NUMBER- See Also:
-
EMBEDDING_FIELD_NUMBER
public static final int EMBEDDING_FIELD_NUMBER- See Also:
-
NEIGHBOR_COUNT_FIELD_NUMBER
public static final int NEIGHBOR_COUNT_FIELD_NUMBER- See Also:
-
STRING_FILTERS_FIELD_NUMBER
public static final int STRING_FILTERS_FIELD_NUMBER- See Also:
-
NUMERIC_FILTERS_FIELD_NUMBER
public static final int NUMERIC_FILTERS_FIELD_NUMBER- See Also:
-
PER_CROWDING_ATTRIBUTE_NEIGHBOR_COUNT_FIELD_NUMBER
public static final int PER_CROWDING_ATTRIBUTE_NEIGHBOR_COUNT_FIELD_NUMBER- See Also:
-
PARAMETERS_FIELD_NUMBER
public static final int PARAMETERS_FIELD_NUMBER- See Also:
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
getInstanceCase
- Specified by:
getInstanceCasein interfaceNearestNeighborQueryOrBuilder
-
hasEntityId
public boolean hasEntityId()Optional. The entity id whose similar entities should be searched for. If embedding is set, search will use embedding instead of entity_id.
string entity_id = 1 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasEntityIdin interfaceNearestNeighborQueryOrBuilder- Returns:
- Whether the entityId field is set.
-
getEntityId
Optional. The entity id whose similar entities should be searched for. If embedding is set, search will use embedding instead of entity_id.
string entity_id = 1 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getEntityIdin interfaceNearestNeighborQueryOrBuilder- Returns:
- The entityId.
-
getEntityIdBytes
public com.google.protobuf.ByteString getEntityIdBytes()Optional. The entity id whose similar entities should be searched for. If embedding is set, search will use embedding instead of entity_id.
string entity_id = 1 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getEntityIdBytesin interfaceNearestNeighborQueryOrBuilder- Returns:
- The bytes for entityId.
-
hasEmbedding
public boolean hasEmbedding()Optional. The embedding vector that be used for similar search.
.google.cloud.aiplatform.v1.NearestNeighborQuery.Embedding embedding = 2 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasEmbeddingin interfaceNearestNeighborQueryOrBuilder- Returns:
- Whether the embedding field is set.
-
getEmbedding
Optional. The embedding vector that be used for similar search.
.google.cloud.aiplatform.v1.NearestNeighborQuery.Embedding embedding = 2 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getEmbeddingin interfaceNearestNeighborQueryOrBuilder- Returns:
- The embedding.
-
getEmbeddingOrBuilder
Optional. The embedding vector that be used for similar search.
.google.cloud.aiplatform.v1.NearestNeighborQuery.Embedding embedding = 2 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getEmbeddingOrBuilderin interfaceNearestNeighborQueryOrBuilder
-
getNeighborCount
public int getNeighborCount()Optional. The number of similar entities to be retrieved from feature view for each query.
int32 neighbor_count = 3 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getNeighborCountin interfaceNearestNeighborQueryOrBuilder- Returns:
- The neighborCount.
-
getStringFiltersList
Optional. The list of string filters.
repeated .google.cloud.aiplatform.v1.NearestNeighborQuery.StringFilter string_filters = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getStringFiltersListin interfaceNearestNeighborQueryOrBuilder
-
getStringFiltersOrBuilderList
Optional. The list of string filters.
repeated .google.cloud.aiplatform.v1.NearestNeighborQuery.StringFilter string_filters = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getStringFiltersOrBuilderListin interfaceNearestNeighborQueryOrBuilder
-
getStringFiltersCount
public int getStringFiltersCount()Optional. The list of string filters.
repeated .google.cloud.aiplatform.v1.NearestNeighborQuery.StringFilter string_filters = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getStringFiltersCountin interfaceNearestNeighborQueryOrBuilder
-
getStringFilters
Optional. The list of string filters.
repeated .google.cloud.aiplatform.v1.NearestNeighborQuery.StringFilter string_filters = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getStringFiltersin interfaceNearestNeighborQueryOrBuilder
-
getStringFiltersOrBuilder
Optional. The list of string filters.
repeated .google.cloud.aiplatform.v1.NearestNeighborQuery.StringFilter string_filters = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getStringFiltersOrBuilderin interfaceNearestNeighborQueryOrBuilder
-
getNumericFiltersList
Optional. The list of numeric filters.
repeated .google.cloud.aiplatform.v1.NearestNeighborQuery.NumericFilter numeric_filters = 8 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getNumericFiltersListin interfaceNearestNeighborQueryOrBuilder
-
getNumericFiltersOrBuilderList
Optional. The list of numeric filters.
repeated .google.cloud.aiplatform.v1.NearestNeighborQuery.NumericFilter numeric_filters = 8 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getNumericFiltersOrBuilderListin interfaceNearestNeighborQueryOrBuilder
-
getNumericFiltersCount
public int getNumericFiltersCount()Optional. The list of numeric filters.
repeated .google.cloud.aiplatform.v1.NearestNeighborQuery.NumericFilter numeric_filters = 8 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getNumericFiltersCountin interfaceNearestNeighborQueryOrBuilder
-
getNumericFilters
Optional. The list of numeric filters.
repeated .google.cloud.aiplatform.v1.NearestNeighborQuery.NumericFilter numeric_filters = 8 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getNumericFiltersin interfaceNearestNeighborQueryOrBuilder
-
getNumericFiltersOrBuilder
Optional. The list of numeric filters.
repeated .google.cloud.aiplatform.v1.NearestNeighborQuery.NumericFilter numeric_filters = 8 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getNumericFiltersOrBuilderin interfaceNearestNeighborQueryOrBuilder
-
getPerCrowdingAttributeNeighborCount
public int getPerCrowdingAttributeNeighborCount()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.
int32 per_crowding_attribute_neighbor_count = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getPerCrowdingAttributeNeighborCountin interfaceNearestNeighborQueryOrBuilder- Returns:
- The perCrowdingAttributeNeighborCount.
-
hasParameters
public boolean hasParameters()Optional. Parameters that can be set to tune query on the fly.
.google.cloud.aiplatform.v1.NearestNeighborQuery.Parameters parameters = 7 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasParametersin interfaceNearestNeighborQueryOrBuilder- Returns:
- Whether the parameters field is set.
-
getParameters
Optional. Parameters that can be set to tune query on the fly.
.google.cloud.aiplatform.v1.NearestNeighborQuery.Parameters parameters = 7 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getParametersin interfaceNearestNeighborQueryOrBuilder- Returns:
- The parameters.
-
getParametersOrBuilder
Optional. Parameters that can be set to tune query on the fly.
.google.cloud.aiplatform.v1.NearestNeighborQuery.Parameters parameters = 7 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getParametersOrBuilderin interfaceNearestNeighborQueryOrBuilder
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static NearestNeighborQuery parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static NearestNeighborQuery parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static NearestNeighborQuery parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static NearestNeighborQuery parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static NearestNeighborQuery parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static NearestNeighborQuery parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static NearestNeighborQuery parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static NearestNeighborQuery parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static NearestNeighborQuery parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static NearestNeighborQuery parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected NearestNeighborQuery.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-