[FEAT] update by query
Opened this issue · 1 comments
AlexRychkov commented
Hello,
in the first version of the lib it was possible to run an update by query with a script,
but can't find similar functionality in current version
fun <T : Any> IndexRepository<T>.updateByQuery(
esClient: RestHighLevelClient,
script: Script,
query: QueryBuilder,
) {
val index = this.indexName
val updateByQueryRequest = UpdateByQueryRequest(index)
updateByQueryRequest.script = script
updateByQueryRequest.setQuery(query)
esClient.updateByQuery(
updateByQueryRequest,
RequestOptions.DEFAULT,
)
}
jillesvangurp commented
Interesting. I've never used this myself. Shouldn't be too hard to add if you want to do a pull request for this.