@@ -92,9 +92,9 @@ protected void afterTest() {
9292 public void clientThrowsIfBatchSizeIsLessThanOne () {
9393 assertThrows (IllegalArgumentException .class , () -> new SearchBatchClientBuilder ().batchSize (0 ));
9494 assertThrows (IllegalArgumentException .class , () -> getSearchClientBuilder ("index" ).buildAsyncClient ()
95- .getSearchIndexDocumentBatchingAsyncClient (null , null , 0 , null ));
95+ .getSearchBatchAsyncClient (null , null , 0 , null ));
9696 assertThrows (IllegalArgumentException .class , () -> getSearchClientBuilder ("index" ).buildClient ()
97- .getSearchIndexDocumentBatchingClient (null , null , 0 , null ));
97+ .getSearchBatchClient (null , null , 0 , null ));
9898 }
9999
100100 /**
@@ -106,7 +106,7 @@ public void flushBatch() {
106106
107107 SearchClient client = clientBuilder .buildClient ();
108108 SearchBatchClient batchingClient = client
109- .getSearchIndexDocumentBatchingClient (false , null , null , null );
109+ .getSearchBatchClient (false , null , null , null );
110110
111111 batchingClient .addUploadActions (readJsonFileToList (HOTELS_DATA_JSON ));
112112 batchingClient .flush ();
@@ -126,7 +126,7 @@ public void autoFlushBatchOnSize() {
126126
127127 SearchClient client = clientBuilder .buildClient ();
128128 SearchBatchClient batchingClient = client
129- .getSearchIndexDocumentBatchingClient (true , Duration .ofMinutes (5 ), 10 , null );
129+ .getSearchBatchClient (true , Duration .ofMinutes (5 ), 10 , null );
130130
131131 batchingClient .addUploadActions (readJsonFileToList (HOTELS_DATA_JSON ));
132132
@@ -144,7 +144,7 @@ public void autoFlushBatchOnDelay() {
144144
145145 SearchClient client = clientBuilder .buildClient ();
146146 SearchBatchClient batchingClient = client
147- .getSearchIndexDocumentBatchingClient (true , Duration .ofSeconds (3 ), 1000 , null );
147+ .getSearchBatchClient (true , Duration .ofSeconds (3 ), 1000 , null );
148148
149149 batchingClient .addUploadActions (readJsonFileToList (HOTELS_DATA_JSON ));
150150
@@ -162,7 +162,7 @@ public void batchFlushesOnClose() {
162162
163163 SearchClient client = clientBuilder .buildClient ();
164164 SearchBatchClient batchingClient = client
165- .getSearchIndexDocumentBatchingClient (true , Duration .ofMinutes (5 ), 1000 , null );
165+ .getSearchBatchClient (true , Duration .ofMinutes (5 ), 1000 , null );
166166
167167 batchingClient .addUploadActions (readJsonFileToList (HOTELS_DATA_JSON ));
168168 batchingClient .close ();
@@ -182,7 +182,7 @@ public void batchGetsDocumentsButNeverFlushes() {
182182
183183 SearchClient client = clientBuilder .buildClient ();
184184 SearchBatchClient batchingClient = client
185- .getSearchIndexDocumentBatchingClient (true , Duration .ofMinutes (5 ), 1000 , null );
185+ .getSearchBatchClient (true , Duration .ofMinutes (5 ), 1000 , null );
186186
187187 batchingClient .addUploadActions (readJsonFileToList (HOTELS_DATA_JSON ));
188188
@@ -197,7 +197,7 @@ public void indexManyDocuments() {
197197
198198 SearchClient client = clientBuilder .buildClient ();
199199 SearchBatchAsyncClient spyClient = spy (clientBuilder .buildAsyncClient ()
200- .getSearchIndexDocumentBatchingAsyncClient (true , Duration .ofSeconds (5 ), 10 , null ));
200+ .getSearchBatchAsyncClient (true , Duration .ofSeconds (5 ), 10 , null ));
201201 SearchBatchClient batchingClient = new SearchBatchClient (spyClient );
202202
203203 List <Map <String , Object >> documents = readJsonFileToList (HOTELS_DATA_JSON );
@@ -224,7 +224,7 @@ public void indexManyDocuments() {
224224 @ Test
225225 public void emptyBatchIsNeverSent () {
226226 SearchBatchAsyncClient spyClient = spy (getSearchClientBuilder ("index" ).buildAsyncClient ()
227- .getSearchIndexDocumentBatchingAsyncClient ());
227+ .getSearchBatchAsyncClient ());
228228 SearchBatchClient batchingClient = new SearchBatchClient (spyClient );
229229
230230 batchingClient .flush ();
@@ -241,7 +241,7 @@ public void flushTimesOut() {
241241 SearchBatchClient batchingClient = getSearchClientBuilder ("index" )
242242 .httpClient (request -> Mono .<HttpResponse >empty ().delayElement (Duration .ofSeconds (5 )))
243243 .buildClient ()
244- .getSearchIndexDocumentBatchingClient ();
244+ .getSearchBatchClient ();
245245
246246 batchingClient .addUploadActions (Collections .singletonList (1 ));
247247
@@ -259,7 +259,7 @@ public void batchHasSomeFailures() {
259259 .httpClient (request -> Mono .just (new MockHttpResponse (request , 207 , new HttpHeaders (),
260260 createMockResponseData (201 , 400 , 201 , 404 , 200 , 200 , 404 , 400 , 400 , 201 ))))
261261 .buildClient ()
262- .getSearchIndexDocumentBatchingClient (false , null , null , hook );
262+ .getSearchBatchClient (false , null , null , hook );
263263
264264 batchingClient .addUploadActions (readJsonFileToList (HOTELS_DATA_JSON ));
265265
@@ -296,7 +296,7 @@ public void retryableDocumentsAreAddedBackToTheBatch() {
296296 .httpClient (request -> Mono .just (new MockHttpResponse (request , 207 , new HttpHeaders (),
297297 createMockResponseData (201 , 409 , 201 , 422 , 200 , 200 , 503 , 409 , 422 , 201 ))))
298298 .buildClient ()
299- .getSearchIndexDocumentBatchingClient (false , null , null , hook );
299+ .getSearchBatchClient (false , null , null , hook );
300300
301301 batchingClient .addUploadActions (readJsonFileToList (HOTELS_DATA_JSON ));
302302
@@ -335,7 +335,7 @@ public void batchSplits() {
335335 ? Mono .just (new MockHttpResponse (request , 413 ))
336336 : createMockBatchSplittingResponse (request , 5 ))
337337 .buildClient ()
338- .getSearchIndexDocumentBatchingClient (false , null , null , hook );
338+ .getSearchBatchClient (false , null , null , hook );
339339
340340 batchingClient .addUploadActions (readJsonFileToList (HOTELS_DATA_JSON ));
341341
@@ -372,7 +372,7 @@ public void batchRetriesUntilLimit() {
372372 .httpClient (request -> Mono .just (new MockHttpResponse (request , 207 , new HttpHeaders (),
373373 createMockResponseData (409 ))))
374374 .buildClient ()
375- .getSearchIndexDocumentBatchingClient (false , null , null , hook );
375+ .getSearchBatchClient (false , null , null , hook );
376376
377377 batchingClient .addUploadActions (readJsonFileToList (HOTELS_DATA_JSON ).subList (0 , 1 ));
378378
@@ -417,7 +417,7 @@ public void batchSplitsUntilOneAndFails() {
417417 SearchBatchClient batchingClient = getSearchClientBuilder ("index" )
418418 .httpClient (request -> Mono .just (new MockHttpResponse (request , 413 )))
419419 .buildClient ()
420- .getSearchIndexDocumentBatchingClient (false , null , null , hook );
420+ .getSearchBatchClient (false , null , null , hook );
421421
422422 batchingClient .addUploadActions (readJsonFileToList (HOTELS_DATA_JSON ).subList (0 , 2 ));
423423
@@ -457,7 +457,7 @@ public void batchSplitsUntilOneAndPartiallyFails() {
457457 ? Mono .just (new MockHttpResponse (request , 413 ))
458458 : createMockBatchSplittingResponse (request , 1 ))
459459 .buildClient ()
460- .getSearchIndexDocumentBatchingClient (false , null , null , hook );
460+ .getSearchBatchClient (false , null , null , hook );
461461
462462 batchingClient .addUploadActions (readJsonFileToList (HOTELS_DATA_JSON ).subList (0 , 2 ));
463463
0 commit comments