mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-26 23:07:45 +00:00
Reject update request that has both script and doc
This commit is contained in:
parent
9ddd675a02
commit
47971ac808
@ -94,6 +94,9 @@ public class UpdateRequest extends InstanceShardOperationRequest<UpdateRequest>
|
||||
if (script == null && doc == null) {
|
||||
validationException = addValidationError("script or doc is missing", validationException);
|
||||
}
|
||||
if (script != null && doc != null) {
|
||||
validationException = addValidationError("can't provide both script and doc", validationException);
|
||||
}
|
||||
return validationException;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user