Skip to content

Commit 511c5cb

Browse files
committed
release: sochdb-python-sdk v0.5.6
- create_index: add ef_search parameter support (default 0 = server default) - search: change ef default from 50 to 0 (use server-side index default) - Bump version to 0.5.6
1 parent fa2d6fe commit 511c5cb

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "sochdb"
7-
version = "0.5.5"
7+
version = "0.5.6"
88
description = "SochDB is an AI-native database with token-optimized output, O(|path|) lookups, built-in vector search, and durable transactions."
99
readme = "README.md"
1010
license = {text = "Apache-2.0"}

src/sochdb/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
client.put_kv("key", b"value")
3333
"""
3434

35-
__version__ = "0.5.4"
35+
__version__ = "0.5.6"
3636

3737
# Embedded mode (FFI)
3838
from .database import Database, Transaction, IsolationLevel

src/sochdb/grpc_client.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ def create_index(
131131
dimension: int,
132132
metric: str = "cosine",
133133
m: int = 16,
134-
ef_construction: int = 200
134+
ef_construction: int = 200,
135+
ef_search: int = 0
135136
) -> bool:
136137
"""Create a new vector index."""
137138
stub = self._get_stub("VectorIndexService")
@@ -143,7 +144,8 @@ def create_index(
143144
metric=getattr(sochdb_pb2, f"DISTANCE_METRIC_{metric.upper()}", 2),
144145
config=sochdb_pb2.HnswConfig(
145146
max_connections=m,
146-
ef_construction=ef_construction
147+
ef_construction=ef_construction,
148+
ef_search=ef_search
147149
)
148150
))
149151
return response.success
@@ -173,7 +175,7 @@ def search(
173175
index_name: str,
174176
query: List[float],
175177
k: int = 10,
176-
ef: int = 50
178+
ef: int = 0
177179
) -> List[SearchResult]:
178180
"""Search for k-nearest neighbors."""
179181
stub = self._get_stub("VectorIndexService")

0 commit comments

Comments
 (0)