你不会是程序猿吧?

query_string问题

Kibana | 作者 abababa | 发布于2018年11月27日 | 阅读数:2853

GET filebeat-*/_search
{
  "query": {
      "bool": {
        "must": [
        {
           "query_string": {
            "analyze_wildcard": true,
             "query": "message:(\"Exception\")",
      "fuzzy_max_expansions": 50
         }
       
           },
       {
                  "range": {
                    "@timestamp": {
                      "gte": "now-2h",
                      "lte": "now",
                      "format": "epoch_millis"
                    }
                  }
                }
       ]
     }
   }
}



GET filebeat-*/_search
{
  "query": {
      "bool": {
        "must": [
        {
           "query_string": {
            "analyze_wildcard": true,
             "query": "message:(\"ArrayIndexOutOfBoundsException\")",
      "fuzzy_max_expansions": 50
         }
       
           },
       {
                  "range": {
                    "@timestamp": {
                      "gte": "now-2h",
                      "lte": "now",
                      "format": "epoch_millis"
                    }
                  }
                }
       ]
     }
   }
}

有点奇怪,Exception有返回数据,ArrayIndexOutOfBoundsException 却没有。。。
已邀请:

somnr

赞同来自:

query_string 是对搜索的关键字分词的,看你搜出结果是什么

tacsklet - 公司有用到es

赞同来自:

用的是默认的分词吗,点号可能没有分,用java.lang.ArrayIndexOutOfBoundsException试一下。

要回复问题请先登录注册