_update API should check the syntax in case of scripted updates #28740
Labels
>bug
:Data Management/Indices APIs
APIs to create and manage indices and templates
help wanted
adoptme
Elasticsearch version (
bin/elasticsearch --version
): 6.1.2Plugins installed: []
Description of the problem including expected versus actual behavior:
The
_update
API doesn't seem to reject a command that is wrong. Actually, this example comes from The Definitive Guide (which I know it's WIP), but still the ES API should reply back with an error for such a command:This returns:
Debugging this with
Debug.explain(params)
shows that there is noparams
registered. Which, in fact, is fine since the syntax is incorrect: there shouldn't be anyparams
definitions at the root level, but insidescript
itself. The correct syntax should be:The text was updated successfully, but these errors were encountered: