Skip to content

Commit

Permalink
Squashed good commits into new branch.
Browse files Browse the repository at this point in the history
  • Loading branch information
arrowplum committed Sep 18, 2024
1 parent ca6e940 commit b132667
Show file tree
Hide file tree
Showing 14 changed files with 1,212 additions and 218 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,6 @@ cython_debug/
.DS_Store

features.conf

# Kubernetes default generated dir
/kubernetes/generated
49 changes: 49 additions & 0 deletions basic-search/check.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import argparse
from aerospike_vector_search import types
from aerospike_vector_search import AdminClient, Client
listener_name = None


with AdminClient(
seeds=types.HostPort(host="34.71.101.78", port=5000),
is_loadbalancer=True,
listener_name=listener_name,
) as adminClient:
try:
print("creating index")
namespace = "test"
name = "basic_search_idx_binary_index_whatever"
vector_field = "vector"
dimensions = 2
sets = "sillypy_index_binary_index_whatever"

adminClient.index_create(
namespace=namespace,
name=name,
vector_field="vector",
dimensions=dimensions,
sets=sets,
index_storage=types.IndexStorage(namespace=namespace, set_name="sillypy_index_binary_index_storage"),
)
except Exception as e:
print("failed creating index " + str(e))
pass

with Client(
seeds=types.HostPort(host="34.71.101.78", port=5000),
is_loadbalancer=True,
listener_name=listener_name,
) as client:
print("inserting vector")
namespace = "test"
set_name = "basic_search_binary_data_2"
key="nah_bro_binary_data_2"
client.upsert(
namespace=namespace,
set_name=set_name,
key=key,
record_data={
"vector": [True, False, False],
}
)

Loading

0 comments on commit b132667

Please sign in to comment.