<p dir="auto">"connectMode":{"type":"string","index":"not_analyzed"},<br>
connectMode: "12" ||  "48" || "1"      All the results will be listed    why?<br>
connectMode: "12" ||  "48"     Results is  correct.<br>
connectMode:  "1"    Results is  correct.</p>
<p dir="auto">"logRank":{"type":"integer","index":"not_analyzed"},</p>
<p dir="auto">logRank: 1  Results is  correct.<br>
logRank: 1  || 2  || 3   All the results will be listed    why?</p>
<p dir="auto"><strong>Describe the feature</strong>:</p>
<p dir="auto">Currently when a painless script cannot be compiled, the error looks something like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2016-11-22T14:16:11,800][WARN ][o.e.s.ScriptService      ] [rcl-nas] failed to load/compile script [sensors-count-transform]
org.elasticsearch.script.ScriptException: compile error
...
Caused by: java.lang.IllegalArgumentException: invalid sequence of tokens near [':'].
        at org.elasticsearch.painless.Executable$Script.compile(sensors-count-transform.painless:104) ~[?:?]
..."><pre class="notranslate"><code class="notranslate">[2016-11-22T14:16:11,800][WARN ][o.e.s.ScriptService      ] [rcl-nas] failed to load/compile script [sensors-count-transform]
org.elasticsearch.script.ScriptException: compile error
...
Caused by: java.lang.IllegalArgumentException: invalid sequence of tokens near [':'].
        at org.elasticsearch.painless.Executable$Script.compile(sensors-count-transform.painless:104) ~[?:?]
...
</code></pre></div>
<p dir="auto">In this case the number 104 is not very helpful in determining the actual location of the error - it would be much more helpful if the error could output the actual line and character number where the syntax error occurred.</p>