0

Is it possible to somehow set the retry_on_conflict parameter while using Update.Builder in Jest ?

I'm trying to set the parameter but am clueless about how I would add this to my request.

Could I somehow add it to the "script" field as demonstrated in https://github.com/searchbox-io/Jest/tree/master/jest in the Updating Documents section ? That works too.

Nkosi
  • 235,767
  • 35
  • 427
  • 472
Hormigas
  • 1,429
  • 5
  • 24
  • 45

1 Answers1

3

Here is how it can be done:

Update update = new Update.Builder(payload)
  .index(aliasName)
  .type(typeName)
  .id(docId)
  .setParameter("retry_on_conflict", 5)
  .build();