Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/search/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Search 如何使用带有特殊字符“的kibana搜索字段”-&引用;_Search_<img Src="//i.stack.imgur.com/RUiNP.png" Height="16" Width="18" Alt="" Class="sponsor Tag Img">elasticsearch_Kibana - Fatal编程技术网 elasticsearch,kibana,Search,elasticsearch,Kibana" /> elasticsearch,kibana,Search,elasticsearch,Kibana" />

Search 如何使用带有特殊字符“的kibana搜索字段”-&引用;

Search 如何使用带有特殊字符“的kibana搜索字段”-&引用;,search,elasticsearch,kibana,Search,elasticsearch,Kibana,my ES索引文档是nginx日志数据,如: { "_index": "nginx-2017-04-30", "_type": "access", "_id": "AVu8nYNM_NKHiROBoHkE", "_score": null, "_source": { "cookie_logintoken": "-", "request_time": "0.000", "reques

my ES索引文档是nginx日志数据,如:

    {
      "_index": "nginx-2017-04-30",
      "_type": "access",
      "_id": "AVu8nYNM_NKHiROBoHkE",
      "_score": null,
      "_source": {
        "cookie_logintoken": "-",
        "request_time": "0.000",
        "request": "POST /login/getMobileLoginCode HTTP/1.1",
        "http_protocol": "https",
        "request_id": "a6fb53fcf28b7d6b400f0611ac697f0d",
        "@timestamp": "2017-04-30T10:08:11+08:00",
        "http_user_agent": "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)",
        "http_x_forwarded_for": "-",
        "request_uri": "/login/getMobileLoginCode",
        "remote_addr": "xxxxxxx",
        "http_ver": "-",
        "status": "503",
        "request_method": "POST",
        "hostname": "master",
        "request_body": "-",
        "upstream_response_time": "-",
        "http_vm": "-",   # my custom http header
        "remote_user": "-",
        "http_referer": "-"
      },
      "fields": {
        "@timestamp": [
          1493518091000
        ]
      },
      "sort": [
        1493518091000
      ]
    }
我想使用kibana搜索所有
http\U vm(我的自定义http头)
,其中值为
“-”

我尝试输入搜索查询,但失败了,kibana返回空结果

我的搜索查询:

http_vm:"-"
http_vm:"\\-"
http_vm:\\-
http_vm:(\\-)
如何搜索“-”字段

多亏了@logan rakai,我找到了路


您正在运行哪个版本的ES?最有可能的情况是,http_vm字段正在由标准分析器进行分析,该分析器会删除标点符号。在ES 5中,存在未分析的关键字子字段。在早期版本中,您可以更改索引映射以使字段不进行分析洛根·拉凯

解决方案: 这个查询有效:


http\u vm.keyword:“-”

您正在运行哪个版本的ES?最有可能的情况是,http_vm字段正在由标准分析器进行分析,该分析器会删除标点符号。在ES 5中,存在未分析的关键字子字段。在早期版本中,您可以更改索引映射以使字段不被分析。我的ES版本是5.2.2,我尝试使用http_vm。关键字:“-”,有效!非常感谢。您正在运行哪个版本的ES?最有可能的情况是,http_vm字段正在由标准分析器进行分析,该分析器会删除标点符号。在ES 5中,存在未分析的关键字子字段。在早期版本中,您可以更改索引映射以使字段不被分析。我的ES版本是5.2.2,我尝试使用http_vm。关键字:“-”,有效!非常感谢。