.avs-client-java.1.1.0.source-code.transact.proto Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of avs-client-java Show documentation
Show all versions of avs-client-java Show documentation
This project includes the Java client for Aerospike Vector Search for high-performance data interactions.
The newest version!
syntax = "proto3";
package aerospike.vector;
option go_package = "aerospike.com/vector/protos/";
option java_package = "com.aerospike.vector.client.proto";
option java_multiple_files = true;
import "google/protobuf/empty.proto";
import "types.proto";
// The type of write operation.
enum WriteType {
// Insert the record if it does not exist.
// Update the record by replacing specified fields.
UPSERT = 0;
// If the record exists update the record by replacing specified fields.
// Fails if the record does not exist.
UPDATE_ONLY = 1;
// Insert / create the record if it does not exists.
// Fails if the record already exist.
INSERT_ONLY = 2;
// Replace all fields in the record if it exists, else create the
// record if it does not exists.
REPLACE = 3;
// Replace all fields in the record if it exists.
// Fails if the record does not exist.
REPLACE_ONLY = 4;
}
// Put request to insert/update a record.
message PutRequest {
// The key for the record to insert/update
Key key = 1;
// The type of the put/write request. Defaults to UPSERT.
optional WriteType writeType = 2;
// The record fields.
repeated Field fields = 3;
// Ignore the in-memory queue full error. These records would be written to
// storage and later, the index healer would pick for indexing.
bool ignoreMemQueueFull = 4;
}
// Get request to insert/update a record.
message GetRequest {
// The key for the record to insert/update
Key key = 1;
// The field selector.
ProjectionSpec projection = 2;
}
// Check if a record exists.
message ExistsRequest {
// The key for the record check
Key key = 1;
}
// Delete request to delete a record.
message DeleteRequest {
// The key for the record to delete
Key key = 1;
}
// Request to check whether the given record is indexed for the specified
// index.
message IsIndexedRequest {
// The key of the aerospike record holding Vector.
Key key = 1;
// Index in which the vector is indexed.
IndexId indexId = 2;
}
// The type of projection.
enum ProjectionType {
ALL = 0;
NONE = 1;
SPECIFIED = 2;
}
// A projection filter.
message ProjectionFilter {
// The type of the selector. Defaults to ALL.
optional ProjectionType type = 1;
// Names of desired fields / selectors.
repeated string fields = 2;
}
// Projection to select which fields are returned.
// A field is returned if it passes the include filter
// and does not pass the exclude filter.
message ProjectionSpec {
// The fields to include.
ProjectionFilter include = 1;
// The fields to exclude.
ProjectionFilter exclude = 2;
}
message VectorSearchRequest {
// The index identifier.
IndexId index = 1;
// The query vector.
Vector queryVector = 2;
// Maximum number of results to return.
uint32 limit = 3;
// Projection to select fields.
ProjectionSpec projection = 4;
// Optional parameters to tune the search.
oneof searchParams {
HnswSearchParams hnswSearchParams = 5;
}
}
// Record transaction services.
service TransactService {
// Update/insert records.
rpc Put(PutRequest) returns (google.protobuf.Empty) {}
// Get a record.
rpc Get(GetRequest) returns (Record) {}
// Delete a record.
rpc Delete(DeleteRequest) returns (google.protobuf.Empty) {}
// Check if a record exists.
rpc Exists(ExistsRequest) returns (Boolean) {}
// Check is a record is indexed.
rpc IsIndexed(IsIndexedRequest) returns (Boolean) {}
// Perform a vector nearest neighbor search.
rpc VectorSearch(VectorSearchRequest) returns (stream Neighbor) {}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy