Skip to content

Add support for routing key per item in bulk#122

Merged
jillesvangurp merged 1 commit into
jillesvangurp:masterfrom
csh97:bulk-routing
Mar 16, 2024
Merged

Add support for routing key per item in bulk#122
jillesvangurp merged 1 commit into
jillesvangurp:masterfrom
csh97:bulk-routing

Conversation

@csh97

@csh97 csh97 commented Mar 15, 2024

Copy link
Copy Markdown
Contributor

Implements #118

Adds support for specifying a routing key per item in a bulk request.

For example:

client.bulk(routing = "1") {
  index(source = objectMapper.writeValueAsString(doc1), index = indexName, id = doc1.id)
  index(source = objectMapper.writeValueAsString(doc2), index = indexName, id = doc2.id, routing = "2")
}

In the case where a routing key is passed as a bulk parameter for the whole request and at the individual item level, then the individual item will take precedence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants