Allow _update on write alias (#45318)
Using the document update API on aliases with a write index does not work. Follow-up to #31520
This commit is contained in:
parent
7d0aff0ed5
commit
5ddeb488a6
|
@ -143,7 +143,7 @@ public abstract class TransportInstanceSingleOperationAction<
|
|||
throw blockException;
|
||||
}
|
||||
}
|
||||
request.concreteIndex(indexNameExpressionResolver.concreteSingleIndex(clusterState, request).getName());
|
||||
request.concreteIndex(indexNameExpressionResolver.concreteWriteIndex(clusterState, request).getName());
|
||||
resolveRequest(clusterState, request);
|
||||
blockException = checkRequestBlock(clusterState, request);
|
||||
if (blockException != null) {
|
||||
|
|
|
@ -292,7 +292,8 @@ public class UpdateIT extends ESIntegTestCase {
|
|||
}
|
||||
|
||||
public void testUpdate() throws Exception {
|
||||
createTestIndex();
|
||||
assertAcked(prepareCreate("test").addAlias(new Alias("alias").writeIndex(true)));
|
||||
assertAcked(prepareCreate("test2").addAlias(new Alias("alias")));
|
||||
ensureGreen();
|
||||
|
||||
Script fieldIncScript = new Script(ScriptType.INLINE, UPDATE_SCRIPTS, FIELD_INC_SCRIPT, Collections.singletonMap("field", "field"));
|
||||
|
|
Loading…
Reference in New Issue