添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
小眼睛的鼠标垫  ·  Parsing error: ...·  2 月前    · 
魁梧的水煮鱼  ·  XiangBu (XiangBu) · ...·  11 月前    · 
果断的甜瓜  ·  java - ...·  1 年前    · 

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whilst doing the request directly to ES using cURL gives:

$ curl -XGET "http://localhost:9200/test/_search" -H 'Content-Type: application/json' -d'
  "_source": {
    "include": ["s", "a"],
    "exclude": "t"
  "query": {
    "match": {
      "s": "value"
{"error":{"root_cause":[{"type":"json_parse_exception","reason":"Unexpected character ('\"' (code 34)): was expecting comma to separate Object entries\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@7d758e66; line: 7, column: 4]"}],"type":"json_parse_exception","reason":"Unexpected character ('\"' (code 34)): was expecting comma to separate Object entries\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@7d758e66; line: 7, column: 4]"},"status":500}%

It seems that if the JSON is invalid we send it as plain text. It would be better if we just send the request as JSON and show the above error (the cURL one), since the user may not have seen that they have an error on the request side.

I wish there was a future proof way of determining the encoding on the fly so that we don't need to worry about potential future mismatches in requirements between Elasticsearch and Kibana console, but clearly it's fragile one way or another, so leaning on the msearch/bulk endpoints may be the best option.