Kibana中的"field"和"field.keyword"字段有什么区别? [英] What's the difference between the 'field' and 'field.keyword' fields in Kibana?

查看:1667
本文介绍了Kibana中的"field"和"field.keyword"字段有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在kibana中添加过滤器时,所有字符串字段都有一个 条目和一个 .keyword 条目.有什么区别?

When adding a filter in kibana all string fields have a entry and .keyword entry. What is the difference?

推荐答案

从elasticsearch 5开始,没有字符串字段类型,而是有两种类型:

From elasticsearch 5 there is no string field type, instead there is two types:

关键字-用于过滤,汇总和排序.

Keyword - use it for filter, aggregation and sort.

文本-用于搜索文本.

当您使用字符串字段(例如名称)索引文档时,elasticsearch将字段映射到文本字段以进行搜索,并映射到关键字以进行过滤.

When you index documents with string field, for example name, elasticsearch mapping the field to text field for search and to keyword for filter.

Kibana使用该字段进行过滤和汇总,因此使用关键字.

Kibana use the field for filter and aggregation, therefore using the keyword.

查看 elasticsearch文档

这篇关于Kibana中的"field"和"field.keyword"字段有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆