【发布时间】:2019-02-19 22:18:17
【问题描述】:
假设我有一个名为“Title”的字段,我想使用不同的分析器(标准和英文)对其进行索引。使用多字段映射或创建两个单独的字段之间有区别吗?
使用多字段映射: https://www.elastic.co/guide/en/elasticsearch/guide/current/multi-fields.html
"mappings": {
"my_type": {
"properties": {
"title": {
"type": "string",
"analyzer": "english",
"fields": {
"std": {
"type": "string",
"analyzer": "standard"
}
}
}
}
}
}
有两个单独的字段:
{
"properties": {
"title_standard": {
"type": "text",
"analyzer": "standard"
},
"title_english": {
"type": "text",
"analyzer": "english"
}
}
}
【问题讨论】:
标签: elasticsearch elasticsearch-5