Skip to content

Commit

Permalink
Merge pull request #21 from aerospike/dev
Browse files Browse the repository at this point in the history
Aerospike-Vector-Search-Client-Release-0.6.0
  • Loading branch information
DomPeliniAerospike authored May 14, 2024
2 parents 9100f70 + a01be35 commit 9bb5796
Show file tree
Hide file tree
Showing 51 changed files with 1,700 additions and 572 deletions.
10 changes: 10 additions & 0 deletions docs/admin.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
AdminClient
=====================

This class is the admin client, designed to conduct AVS administrative operation such as creating indexes, querying index information, and dropping indexes.


.. autoclass:: aerospike_vector_search.admin.Client
:members:
:undoc-members:
:show-inheritance:
12 changes: 12 additions & 0 deletions docs/aio.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
aio Module
=====================

This module contains clients with coroutine methods used for asynchronous programming.


.. toctree::
:maxdepth: 2
:caption: Contents:

aio_admin
aio_client
10 changes: 10 additions & 0 deletions docs/aio_admin.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
AdminClient
=====================

This class is the admin client, designed to conduct AVS administrative operation such as creating indexes, querying index information, and dropping indexes.


.. autoclass:: aerospike_vector_search.aio.admin.Client
:members:
:undoc-members:
:show-inheritance:
10 changes: 10 additions & 0 deletions docs/aio_client.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Client
======================

This class is standard client, which specializes in performing database operations with vector data.


.. autoclass:: aerospike_vector_search.aio.Client
:members:
:undoc-members:
:show-inheritance:
10 changes: 10 additions & 0 deletions docs/client.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Client
======================

This class is standard client, which specializes in performing database operations with vector data.


.. autoclass:: aerospike_vector_search.Client
:members:
:undoc-members:
:show-inheritance:
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
project = 'aerospike-vector-search'
copyright = '2024, Dominic Pelini'
author = 'Dominic Pelini'
release = '0.5.0'
release = '0.6.0'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand All @@ -26,4 +26,4 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
html_static_path = ['']
12 changes: 7 additions & 5 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ Welcome to Aerospike Vector Search Client for Python.

This package splits the client functionality into two separate clients.

This vector client (VectorDbClient) specializes in performing database operations with vector data.
Moreover, the client supports Hierarchical Navigable Small World (HNSW) vector searches,
This standard client (Client) specializes in performing database operations with vector data.
Moreover, the standard client supports Hierarchical Navigable Small World (HNSW) vector searches,
allowing users to find vectors similar to a given query vector within an index.

This admin client (VectorDbAdminClient) is designed to conduct Proximus administrative operation such
This admin client (AdminClient) is designed to conduct Proximus administrative operation such
as creating indexes, querying index information, and dropping indexes.

Please explore the modules below for more information on API usage and details.
Expand All @@ -22,10 +22,12 @@ Please explore the modules below for more information on API usage and details.
:maxdepth: 2
:caption: Contents:

vectordb_client
vectordb_admin
aio
admin
client
types


Indices and tables
==================

Expand Down
10 changes: 0 additions & 10 deletions docs/vectordb_admin.rst

This file was deleted.

10 changes: 0 additions & 10 deletions docs/vectordb_client.rst

This file was deleted.

76 changes: 64 additions & 12 deletions proto/transact.proto
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

syntax = "proto3";

package aerospike.vector;
Expand All @@ -9,22 +10,52 @@ 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;
}

// Put request to insert/update a record.
message PutRequest {
// The key for the record to insert/update
Key key = 1;

// The record bins.
repeated Bin bins = 3;
// The type of the put/write request.
WriteType writeType = 2;

// The record fields.
repeated Field fields = 3;
}

// Get request to insert/update a record.
message GetRequest {
// The key for the record to insert/update
Key key = 1;

// The bin selector.
BinSelector binSelector = 2;
// The field selector.
ProjectionSpec projectionSpec = 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
Expand All @@ -37,18 +68,31 @@ message IsIndexedRequest {
IndexId indexId = 2;
}

enum BinSelectorType {
// The type of projection.
enum ProjectionType {
ALL = 0;
NONE = 1;
SPECIFIED = 2;
}

message BinSelector {
// A projection filter.
message ProjectionFilter {
// The type of the selector.
BinSelectorType type = 1;
ProjectionType type = 1;

// Bin names of specific bins are desired.
repeated string binNames = 2;
// 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 {
Expand All @@ -61,8 +105,8 @@ message VectorSearchRequest {
// Maximum number of results to return.
uint32 limit = 3;

// The bin selector.
BinSelector binSelector = 4;
// Projection to select fields.
ProjectionSpec projection = 4;

// Optional parameters to tune the search.
oneof searchParams {
Expand All @@ -72,13 +116,21 @@ message VectorSearchRequest {

// Record transaction services.
service Transact {
// Update/insert records.
rpc Put(PutRequest) returns (google.protobuf.Empty) {}

// Get a record.
rpc Get(GetRequest) returns (Record) {}

rpc Exists(Key) returns (Boolean) {}
// 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) {}
}
Loading

0 comments on commit 9bb5796

Please sign in to comment.