Kibana脚本字段

时间:2018-06-03 19:54:47

标签: elasticsearch kibana

我想通过curl添加脚本字段。

我知道我必须更新.kibana索引,特别是该索引模式的文档。

以下是我在索引模式pattern_name

中添加脚本字段测试的代码
"type": "illegal_argument_exception",
"reason": "failed to execute script",
"caused_by": {
"type": "script_exception",
"reason": "compile error",
"script_stack": [
"ctx._source.new_field = {'name':'test','type':'nu ...",
" ^---- HERE"
],
"script": "ctx._source.new_field = {'name':'test','type':'number','count':0,'scripted':true,'script':'4150','lang':'painless','searchable':true,'aggregatable':true,'readFromDocValues':false}",
"lang": "painless",
"caused_by": {
"type": "illegal_argument_exception",
"reason": "invalid sequence of tokens near ['{'].",
"caused_by": {
"type": "no_viable_alt_exception",
"reason": null
}
}
}
},
"status": 400
}

我收到错误说

<body>
    <select id="select">
        <option>1</option>
        <option>2</option>
        <option>3</option>
    </select>
    <script>
        var wto;
        $('#select').change(function() {
          wto = setTimeout(function() {
            // write your code here
            console.log('something changed');
          }, 2000);
        });
    </script>
</body>

0 个答案:

没有答案