【发布时间】:2016-06-07 18:42:16
【问题描述】:
假设我们对同一个索引中不同记录类型的同一个字段名有不同的映射,我们可以对同一个字段名的索引做同样的映射吗?
例如, 我们有名为 1000 的索引和两种记录类型,分别为 school 和 college 。两种记录类型都有字段名称“location”,具有不同的映射,如下所示.
学校:
"location":{
"type":"multi_field",
"fields":{
"location":{"type":"string","analyzer":"sortable"},
"contains":{
"type":"string",
"analyzer":"containsAnalyzer",
"search_analyzer":"standardAnalyzer"
}
}
}
For college:
"location":{
"type":"string",
"index":"not_analyzed"
}
有没有什么方法可以在两种记录类型上为 location 进行类似的映射?
【问题讨论】:
标签: elasticsearch