在 Kibana 中查询完全匹配
Querying for exact match in Kibana
在我的 Kibana 中,当我搜索我的文档时,我需要查找完全匹配:
在我的文档中,我有一个名为 message 的字段。
所以如果我搜索(使用 Kibana)类似的东西:
message: "Provider replied with error code 2006"
我得到了所有包含这些词的一个实例的文档。
我想要精确匹配。
我是 运行 Kibana:5.3.2。 Elasticsearch 是 5.3.2
在 Elasticsearch 中有两种 "Strings"。
关键词:
They are typically used for filtering (Find me all blog posts where status is published), for sorting, and for aggregations. Keyword
fields are only searchable by their exact value.
正文
field to index full-text values, such as the body of an email or the description of a product. These fields are analyzed, that is they are passed through an analyzer to convert the string into a list of individual terms before being indexed.
有时可以通过在您的字段中添加“.keyword”来访问关键字。所以试试这个:
message.keyword: "Provider replied with error code 2006"
否则您必须检查您的映射并将其更改为关键字。
在我的 Kibana 中,当我搜索我的文档时,我需要查找完全匹配: 在我的文档中,我有一个名为 message 的字段。
所以如果我搜索(使用 Kibana)类似的东西:
message: "Provider replied with error code 2006"
我得到了所有包含这些词的一个实例的文档。 我想要精确匹配。
我是 运行 Kibana:5.3.2。 Elasticsearch 是 5.3.2
在 Elasticsearch 中有两种 "Strings"。
关键词:
They are typically used for filtering (Find me all blog posts where status is published), for sorting, and for aggregations. Keyword
fields are only searchable by their exact value.正文
field to index full-text values, such as the body of an email or the description of a product. These fields are analyzed, that is they are passed through an analyzer to convert the string into a list of individual terms before being indexed.
有时可以通过在您的字段中添加“.keyword”来访问关键字。所以试试这个:
message.keyword: "Provider replied with error code 2006"
否则您必须检查您的映射并将其更改为关键字。