@@ -262,18 +262,20 @@ public interface ElasticSearchClientService extends ControllerService, Verifiabl
262
262
*
263
263
* @param operation A document to index.
264
264
* @param requestParameters A collection of URL request parameters. Optional.
265
+ * @param requestHeaders A collection of request headers. Optional.
265
266
* @return IndexOperationResponse if successful
266
267
*/
267
- IndexOperationResponse add (IndexOperationRequest operation , Map <String , String > requestParameters );
268
+ IndexOperationResponse add (IndexOperationRequest operation , Map <String , String > requestParameters , Map < String , String > requestHeaders );
268
269
269
270
/**
270
271
* Bulk process multiple documents.
271
272
*
272
273
* @param operations A list of index operations.
273
274
* @param requestParameters A collection of URL request parameters. Optional.
275
+ * @param requestHeaders A collection of request headers. Optional.
274
276
* @return IndexOperationResponse if successful.
275
277
*/
276
- IndexOperationResponse bulk (List <IndexOperationRequest > operations , Map <String , String > requestParameters );
278
+ IndexOperationResponse bulk (List <IndexOperationRequest > operations , Map <String , String > requestParameters , Map < String , String > requestHeaders );
277
279
278
280
/**
279
281
* Count the documents that match the criteria.
@@ -282,9 +284,10 @@ public interface ElasticSearchClientService extends ControllerService, Verifiabl
282
284
* @param index The index to target.
283
285
* @param type The type to target. Will not be used in future versions of Elasticsearch.
284
286
* @param requestParameters A collection of URL request parameters. Optional.
287
+ * @param requestHeaders A collection of request headers. Optional.
285
288
* @return number of documents matching the query
286
289
*/
287
- Long count (String query , String index , String type , Map <String , String > requestParameters );
290
+ Long count (String query , String index , String type , Map <String , String > requestParameters , Map < String , String > requestHeaders );
288
291
289
292
/**
290
293
* Delete a document by its ID from an index.
@@ -293,9 +296,10 @@ public interface ElasticSearchClientService extends ControllerService, Verifiabl
293
296
* @param type The type to target. Optional. Will not be used in future versions of Elasticsearch.
294
297
* @param id The document ID to remove from the selected index.
295
298
* @param requestParameters A collection of URL request parameters. Optional.
299
+ * @param requestHeaders A collection of request headers. Optional.
296
300
* @return A DeleteOperationResponse object if successful.
297
301
*/
298
- DeleteOperationResponse deleteById (String index , String type , String id , Map <String , String > requestParameters );
302
+ DeleteOperationResponse deleteById (String index , String type , String id , Map <String , String > requestParameters , Map < String , String > requestHeaders );
299
303
300
304
301
305
/**
@@ -304,9 +308,10 @@ public interface ElasticSearchClientService extends ControllerService, Verifiabl
304
308
* @param type The type to target. Optional. Will not be used in future versions of Elasticsearch.
305
309
* @param ids A list of document IDs to remove from the selected index.
306
310
* @param requestParameters A collection of URL request parameters. Optional.
311
+ * @param requestHeaders A collection of request headers. Optional.
307
312
* @return A DeleteOperationResponse object if successful.
308
313
*/
309
- DeleteOperationResponse deleteById (String index , String type , List <String > ids , Map <String , String > requestParameters );
314
+ DeleteOperationResponse deleteById (String index , String type , List <String > ids , Map <String , String > requestParameters , Map < String , String > requestHeaders );
310
315
311
316
/**
312
317
* Delete documents by query.
@@ -315,9 +320,10 @@ public interface ElasticSearchClientService extends ControllerService, Verifiabl
315
320
* @param index The index to target.
316
321
* @param type The type to target within the index. Optional. Will not be used in future versions of Elasticsearch.
317
322
* @param requestParameters A collection of URL request parameters. Optional.
323
+ * @param requestHeaders A collection of request headers. Optional.
318
324
* @return A DeleteOperationResponse object if successful.
319
325
*/
320
- DeleteOperationResponse deleteByQuery (String query , String index , String type , Map <String , String > requestParameters );
326
+ DeleteOperationResponse deleteByQuery (String query , String index , String type , Map <String , String > requestParameters , Map < String , String > requestHeaders );
321
327
322
328
/**
323
329
* Update documents by query.
@@ -326,25 +332,29 @@ public interface ElasticSearchClientService extends ControllerService, Verifiabl
326
332
* @param index The index to target.
327
333
* @param type The type to target within the index. Optional. Will not be used in future versions of Elasticsearch.
328
334
* @param requestParameters A collection of URL request parameters. Optional.
335
+ * @param requestHeaders A collection of request headers. Optional.
329
336
* @return An UpdateOperationResponse object if successful.
330
337
*/
331
- UpdateOperationResponse updateByQuery (String query , String index , String type , Map <String , String > requestParameters );
338
+ UpdateOperationResponse updateByQuery (String query , String index , String type , Map <String , String > requestParameters , Map < String , String > requestHeaders );
332
339
333
340
/**
334
341
* Refresh index/indices.
335
342
*
336
343
* @param index The index to target, if omitted then all indices will be updated.
337
344
* @param requestParameters A collection of URL request parameters. Optional.
345
+ * @param requestHeaders A collection of request headers. Optional.
338
346
*/
339
- void refresh (final String index , final Map <String , String > requestParameters );
347
+ void refresh (final String index , final Map <String , String > requestParameters , Map < String , String > requestHeaders );
340
348
341
349
/**
342
350
* Check whether an index exists.
343
351
*
344
352
* @param index The index to check.
345
353
* @param requestParameters A collection of URL request parameters. Optional.
354
+ * @param requestHeaders A collection of request headers. Optional.
355
+ * @return true if index exists, false otherwise
346
356
*/
347
- boolean exists (final String index , final Map <String , String > requestParameters );
357
+ boolean exists (final String index , final Map <String , String > requestParameters , Map < String , String > requestHeaders );
348
358
349
359
/**
350
360
* Check whether a document exists.
@@ -353,8 +363,10 @@ public interface ElasticSearchClientService extends ControllerService, Verifiabl
353
363
* @param type The document type. Optional. Will not be used in future versions of Elasticsearch.
354
364
* @param id The document ID
355
365
* @param requestParameters A collection of URL request parameters. Optional.
366
+ * @param requestHeaders A collection of request headers. Optional.
367
+ * @return true if doc exists in index, false otherwise
356
368
*/
357
- boolean documentExists (final String index , final String type , final String id , final Map <String , String > requestParameters );
369
+ boolean documentExists (final String index , final String type , final String id , final Map <String , String > requestParameters , Map < String , String > requestHeaders );
358
370
359
371
/**
360
372
* Get a document by ID.
@@ -363,55 +375,61 @@ public interface ElasticSearchClientService extends ControllerService, Verifiabl
363
375
* @param type The document type. Optional. Will not be used in future versions of Elasticsearch.
364
376
* @param id The document ID
365
377
* @param requestParameters A collection of URL request parameters. Optional.
378
+ * @param requestHeaders A collection of request headers. Optional.
366
379
* @return Map if successful, null if not found.
367
380
*/
368
- Map <String , Object > get (String index , String type , String id , Map <String , String > requestParameters );
381
+ Map <String , Object > get (String index , String type , String id , Map <String , String > requestParameters , Map < String , String > requestHeaders );
369
382
370
383
/**
371
384
* Perform a search using the JSON DSL.
372
385
*
373
- * @param query A JSON string reprensenting the query.
386
+ * @param query A JSON string representing the query.
374
387
* @param index The index to target. Optional.
375
388
* @param type The type to target. Optional. Will not be used in future versions of Elasticsearch.
376
389
* @param requestParameters A collection of URL request parameters. Optional.
390
+ * @param requestHeaders A collection of request headers. Optional.
377
391
* @return A SearchResponse object if successful.
378
392
*/
379
- SearchResponse search (String query , String index , String type , Map <String , String > requestParameters );
393
+ SearchResponse search (String query , String index , String type , Map <String , String > requestParameters , Map < String , String > requestHeaders );
380
394
381
395
/**
382
396
* Retrieve next page of results from a Scroll.
383
397
*
384
398
* @param scroll A JSON string containing scrollId and optional scroll (keep alive) retention period.
399
+ * @param requestHeaders A collection of request headers. Optional.
385
400
* @return A SearchResponse object if successful.
386
401
*/
387
- SearchResponse scroll (String scroll );
402
+ SearchResponse scroll (String scroll , Map < String , String > requestHeaders );
388
403
389
404
/**
390
405
* Initialise a Point in Time for paginated queries.
391
406
* Requires Elasticsearch 7.10+ and XPack features.
392
407
*
393
408
* @param index Index targeted.
394
409
* @param keepAlive Point in Time's retention period (maximum time Elasticsearch will retain the PiT between requests). Optional.
410
+ * @param requestHeaders A collection of request headers. Optional.
395
411
* @return the Point in Time Id (pit_id)
396
412
*/
397
- String initialisePointInTime (String index , String keepAlive );
413
+ String initialisePointInTime (String index , String keepAlive , Map < String , String > requestHeaders );
398
414
399
415
/**
400
416
* Delete a Point in Time.
401
417
* Requires Elasticsearch 7.10+ and XPack features.
402
418
*
403
419
* @param pitId Point in Time Id to be deleted.
420
+ * @param requestHeaders A collection of request headers. Optional.
404
421
* @return A DeleteOperationResponse object if successful.
405
422
*/
406
- DeleteOperationResponse deletePointInTime (String pitId );
423
+ DeleteOperationResponse deletePointInTime (String pitId , Map < String , String > requestHeaders );
407
424
408
425
/**
409
426
* Delete a Scroll.
410
427
*
411
428
* @param scrollId Scroll Id to be deleted.
429
+ * @param requestHeaders A collection of request headers. Optional.
412
430
* @return A DeleteOperationResponse object if successful.
413
431
*/
414
- DeleteOperationResponse deleteScroll (String scrollId );
432
+ DeleteOperationResponse deleteScroll (String scrollId , Map < String , String > requestHeaders );
415
433
416
434
/**
417
435
* Build a transit URL to use with the provenance reporter.
0 commit comments