OpenSearch/docs/painless/painless-guide
Stuart Tettemer 41c15b438d
Scripting: Add char position of script errors (#51069) (#51266)
Add the character position of a scripting error to error responses.

The contents of the `position` field are experimental and subject to
change.  Currently, `offset` refers to the character location where the
error was encountered, `start` and `end` define a range of characters
that contain the error.

eg.
```
{
  "error": {
    "root_cause": [
      {
        "type": "script_exception",
        "reason": "runtime error",
        "script_stack": [
          "y = x;",
          "     ^---- HERE"
        ],
        "script": "def x = new ArrayList(); Map y = x;",
        "lang": "painless",
        "position": {
          "offset": 33,
          "start": 29,
          "end": 35
        }
      }
```

Refs: #50993
2020-01-21 13:45:59 -07:00
..
index.asciidoc [DOCS] Add redirect for painless examples anchor 2019-06-25 12:34:18 -04:00
painless-datetime.asciidoc [DOCS] Correct typos in Painless datetime docs (#50563) 2020-01-02 13:16:56 -05:00
painless-debugging.asciidoc Scripting: Add char position of script errors (#51069) (#51266) 2020-01-21 13:45:59 -07:00
painless-execute-script.asciidoc [DOCS] Fix typos in Painless execute API docs(#47518) 2019-10-18 10:31:04 -04:00
painless-method-dispatch.asciidoc Reorganize Painless doc structure (#42303) 2019-05-21 10:50:21 -07:00
painless-walkthrough.asciidoc [DOCS] [2 of 5] Change // CONSOLE comments to [source,console] (#46353) (#46502) 2019-09-09 13:38:14 -04:00