DATAES-238 - Fix ElasticsearchTemplate.prepareUpdate(): preserve routing
* need to specify Locale.ENGLISH in String.format() to make tests succeed on non-english locales * that's because the String.format involves floating point numbers which are formatted differently in some locales * ElasticsearchTemplate.prepareUpdate() properly copies routing from given UpdateRequest * add unit tests to ElasticsearchTemplateParentChildTests for update of a child document
This commit is contained in:
committed by
Mohsin Husen
parent
907571e550
commit
8bb4ac3653
@@ -538,6 +538,7 @@ public class ElasticsearchTemplate implements ElasticsearchOperations, Applicati
|
||||
Assert.notNull(query.getId(), "No Id define for Query");
|
||||
Assert.notNull(query.getUpdateRequest(), "No IndexRequest define for Query");
|
||||
UpdateRequestBuilder updateRequestBuilder = client.prepareUpdate(indexName, type, query.getId());
|
||||
updateRequestBuilder.setRouting(query.getUpdateRequest().routing());
|
||||
|
||||
if (query.getUpdateRequest().script() == null) {
|
||||
// doc
|
||||
|
||||
Reference in New Issue
Block a user