【问题标题】:Elastic Search analyzing fields and Kibana Graphs LegendsElastic Search 分析字段和 Kibana Graphs Legends
【发布时间】:2015-06-11 09:48:39
【问题描述】:

我使用的是 elasticsearch 1.5.2 和 Kibana 4.0.3。

我的分析器有问题,使用默认的分析器,kibana 图中的图例用 &、/ 和 - 分隔字段。 这是默认行为。 我尝试将字段设置为 not_analyzed,然后 kibana 图例显示正常,并且图表中的分组是我想要的,按字段。 问题是通配符不适用于搜索,要搜索您需要使用确切值的字段。

我无法找到一个分析器或分词器来保留该字段的原样。

关于如何使用 not_analyzed 但仍能像分析时一样进行搜索的任何想法?

谢谢, 艾萨克

【问题讨论】:

    标签: elasticsearch kibana-4


    【解决方案1】:

    你需要使用多字段(https://www.elastic.co/guide/en/elasticsearch/reference/current/_multi_fields.html)来实现你想要的。

    例如:

    "title": {
        "type": "string",
        "fields": {
            "raw":   { "type": "string", "index": "not_analyzed" }
        }
    }
    

    然后,您将使用 title:whatever 进行搜索,并在 kibana 面板中使用 title.raw 以获得正确的图例行为。

    【讨论】:

    • 谢谢,去试试 :-)
    猜你喜欢
    • 2018-06-10
    • 1970-01-01
    • 2017-04-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-08-24
    相关资源
    最近更新 更多