@@ -504,6 +504,7 @@ async def save_objects(
504
504
index_name : str ,
505
505
objects : List [Dict [str , Any ]],
506
506
wait_for_tasks : bool = False ,
507
+ batch_size : int = 1000 ,
507
508
request_options : Optional [Union [dict , RequestOptions ]] = None ,
508
509
) -> List [BatchResponse ]:
509
510
"""
@@ -514,6 +515,7 @@ async def save_objects(
514
515
objects = objects ,
515
516
action = Action .ADDOBJECT ,
516
517
wait_for_tasks = wait_for_tasks ,
518
+ batch_size = batch_size ,
517
519
request_options = request_options ,
518
520
)
519
521
@@ -522,6 +524,7 @@ async def delete_objects(
522
524
index_name : str ,
523
525
object_ids : List [str ],
524
526
wait_for_tasks : bool = False ,
527
+ batch_size : int = 1000 ,
525
528
request_options : Optional [Union [dict , RequestOptions ]] = None ,
526
529
) -> List [BatchResponse ]:
527
530
"""
@@ -532,6 +535,7 @@ async def delete_objects(
532
535
objects = [{"objectID" : id } for id in object_ids ],
533
536
action = Action .DELETEOBJECT ,
534
537
wait_for_tasks = wait_for_tasks ,
538
+ batch_size = batch_size ,
535
539
request_options = request_options ,
536
540
)
537
541
@@ -541,6 +545,7 @@ async def partial_update_objects(
541
545
objects : List [Dict [str , Any ]],
542
546
create_if_not_exists : bool = False ,
543
547
wait_for_tasks : bool = False ,
548
+ batch_size : int = 1000 ,
544
549
request_options : Optional [Union [dict , RequestOptions ]] = None ,
545
550
) -> List [BatchResponse ]:
546
551
"""
@@ -553,6 +558,7 @@ async def partial_update_objects(
553
558
if create_if_not_exists
554
559
else Action .PARTIALUPDATEOBJECTNOCREATE ,
555
560
wait_for_tasks = wait_for_tasks ,
561
+ batch_size = batch_size ,
556
562
request_options = request_options ,
557
563
)
558
564
@@ -5526,6 +5532,7 @@ def save_objects(
5526
5532
index_name : str ,
5527
5533
objects : List [Dict [str , Any ]],
5528
5534
wait_for_tasks : bool = False ,
5535
+ batch_size : int = 1000 ,
5529
5536
request_options : Optional [Union [dict , RequestOptions ]] = None ,
5530
5537
) -> List [BatchResponse ]:
5531
5538
"""
@@ -5536,6 +5543,7 @@ def save_objects(
5536
5543
objects = objects ,
5537
5544
action = Action .ADDOBJECT ,
5538
5545
wait_for_tasks = wait_for_tasks ,
5546
+ batch_size = batch_size ,
5539
5547
request_options = request_options ,
5540
5548
)
5541
5549
@@ -5544,6 +5552,7 @@ def delete_objects(
5544
5552
index_name : str ,
5545
5553
object_ids : List [str ],
5546
5554
wait_for_tasks : bool = False ,
5555
+ batch_size : int = 1000 ,
5547
5556
request_options : Optional [Union [dict , RequestOptions ]] = None ,
5548
5557
) -> List [BatchResponse ]:
5549
5558
"""
@@ -5554,6 +5563,7 @@ def delete_objects(
5554
5563
objects = [{"objectID" : id } for id in object_ids ],
5555
5564
action = Action .DELETEOBJECT ,
5556
5565
wait_for_tasks = wait_for_tasks ,
5566
+ batch_size = batch_size ,
5557
5567
request_options = request_options ,
5558
5568
)
5559
5569
@@ -5563,6 +5573,7 @@ def partial_update_objects(
5563
5573
objects : List [Dict [str , Any ]],
5564
5574
create_if_not_exists : bool = False ,
5565
5575
wait_for_tasks : bool = False ,
5576
+ batch_size : int = 1000 ,
5566
5577
request_options : Optional [Union [dict , RequestOptions ]] = None ,
5567
5578
) -> List [BatchResponse ]:
5568
5579
"""
@@ -5575,6 +5586,7 @@ def partial_update_objects(
5575
5586
if create_if_not_exists
5576
5587
else Action .PARTIALUPDATEOBJECTNOCREATE ,
5577
5588
wait_for_tasks = wait_for_tasks ,
5589
+ batch_size = batch_size ,
5578
5590
request_options = request_options ,
5579
5591
)
5580
5592
0 commit comments