Elasticsearch:原始字段和关键字字段之间的区别
Elasticsarch : difference between raw and keyword field
在 Elasticsearch 7 中,考虑以下三个映射:
"properties" : {
"actors" : {
"type" : "text",
"fields" : {"keyword" : {"type" : "keyword","ignore_above" : 25}}
},
和
"properties" : {
"actors" : {
"type" : "text",
"fields" : {"raw" : {"type" : "keyword","ignore_above" : 25}}
},
和
"properties" : {
"actors" : {
"type" : "text",
"fields" : {"custom_field" : {"type" : "keyword","ignore_above" : 25}}
},
actors.keyword、actors.raw 和 actor.custom_field 有什么区别?
谢谢
他们是一样的。它们只是三个类型为关键字的字段,具有不同的名称
在 Elasticsearch 7 中,考虑以下三个映射:
"properties" : {
"actors" : {
"type" : "text",
"fields" : {"keyword" : {"type" : "keyword","ignore_above" : 25}}
},
和
"properties" : {
"actors" : {
"type" : "text",
"fields" : {"raw" : {"type" : "keyword","ignore_above" : 25}}
},
和
"properties" : {
"actors" : {
"type" : "text",
"fields" : {"custom_field" : {"type" : "keyword","ignore_above" : 25}}
},
actors.keyword、actors.raw 和 actor.custom_field 有什么区别?
谢谢
他们是一样的。它们只是三个类型为关键字的字段,具有不同的名称