Improve type errors in painless with user-friendly suggestions #53904
Labels
:Core/Infra/Scripting
Scripting abstractions, Painless, and Mustache
>enhancement
Team:Core/Infra
Meta label for core/infra team
triaged
Issue has been looked at, and is being left open
It can be hard to know the types one is working with in a painless script without having mappings in ones head.
Say
field
is adate
and you have the following script:Our current error is:
Cannot apply [+] operation to types [org.elasticsearch.index.fielddata.ScriptDocValues.Dates] and [java.lang.Integer].
For common failures, particularly around dates, we can provide a more human error, such as:
cc: @bmcconaghy @cjcenizal
The text was updated successfully, but these errors were encountered: