Skip to content

Commit

Permalink
feat: add apply_defaults param to index_get
Browse files Browse the repository at this point in the history
  • Loading branch information
dwelch-spike committed Aug 28, 2024
1 parent 6d3cad3 commit 05aefeb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/aerospike_vector_search/aio/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ async def index_list(self, timeout: Optional[int] = None, apply_defaults: Option
return self._respond_index_list(response)

async def index_get(
self, *, namespace: str, name: str, timeout: Optional[int] = None
self, *, namespace: str, name: str, timeout: Optional[int] = None, apply_defaults: Optional[bool] = True
) -> dict[str, Union[int, str]]:
"""
Retrieve the information related with an index.
Expand All @@ -266,6 +266,9 @@ async def index_get(
:param timeout: Time in seconds this operation will wait before raising an :class:`AVSServerError <aerospike_vector_search.types.AVSServerError>`. Defaults to None.
:type timeout: int
:param apply_defaults: Apply default values to parameters which are not set by user. Defaults to True.
:type apply_defaults: bool
Returns: dict[str, Union[int, str]: Information about an index.
Raises:
Expand All @@ -276,7 +279,7 @@ async def index_get(
await self._channel_provider._is_ready()

(index_stub, index_get_request, kwargs) = self._prepare_index_get(
namespace, name, timeout, logger
namespace, name, timeout, logger, apply_defaults,
)

try:
Expand Down
2 changes: 1 addition & 1 deletion tests/standard/sync/test_admin_client_index_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ def test_index_create_with_sets(session_admin_client, test_case, random_name):
vector_distance_metric=None,
sets="demo",
index_params=types.HnswParams(
batching_params=types.HnswBatchingParams(max_records=500, interval=500),
batching_params=types.HnswBatchingParams(max_records=2000, interval=500),
),
index_labels=None,
index_storage=None,
Expand Down

0 comments on commit 05aefeb

Please sign in to comment.