@@ -1436,6 +1436,7 @@ def match(
1436
1436
approx_num_neighbors : Optional [int ] = None ,
1437
1437
fraction_leaf_nodes_to_search_override : Optional [float ] = None ,
1438
1438
return_full_datapoint : bool = False ,
1439
+ low_level_batch_size : int = 0 ,
1439
1440
) -> List [List [MatchNeighbor ]]:
1440
1441
"""Retrieves nearest neighbors for the given embedding queries on the
1441
1442
specified deployed index for private endpoint only.
@@ -1472,6 +1473,13 @@ def match(
1472
1473
vector values and of the nearest neighbors are returned.
1473
1474
Note that returning full datapoint will significantly increase the
1474
1475
latency and cost of the query.
1476
+ low_level_batch_size (int):
1477
+ Optional. Selects the optimal batch size to use for low-level
1478
+ batching. Queries within each low level batch are executed
1479
+ sequentially while low level batches are executed in parallel.
1480
+ This field is optional, defaults to 0 if not set. A non-positive
1481
+ number disables low level batching, i.e. all queries are
1482
+ executed sequentially.
1475
1483
1476
1484
Returns:
1477
1485
List[List[MatchNeighbor]] - A list of nearest neighbors for each query.
@@ -1487,6 +1495,7 @@ def match(
1487
1495
match_service_pb2 .BatchMatchRequest .BatchMatchRequestPerIndex ()
1488
1496
)
1489
1497
batch_request_for_index .deployed_index_id = deployed_index_id
1498
+ batch_request_for_index .low_level_batch_size = low_level_batch_size
1490
1499
1491
1500
# Preprocess restricts to be used for each request
1492
1501
restricts = []
0 commit comments