逗号分词器
PUT index_stg
{
"settings": {
"analysis": {
"analyzer": {
"comma": {
"type": "pattern",
"pattern":","
}
}
}
},
"mappings": {
"Index":{
"properties" : {
"itemAreaChannelPrice" : {
"type" : "text",
"analyzer" : "comma"
},
"itemAreaPrice" : {
"type" : "text",
"analyzer" : "comma"
},
"itemDistAreaCountryIds" : {
"type" : "text",
"analyzer" : "comma"
},
"itemDistAreaStoreIds" : {
"type" : "text",
"analyzer" : "comma"
}
}
}
}
}
该博客介绍了如何在Elasticsearch中设置逗号作为分词器的模式,用于处理包含逗号分隔的数据字段,如`itemAreaChannelPrice`、`itemAreaPrice`、`itemDistAreaCountryIds`和`itemDistAreaStoreIds`。这个配置有助于正确地索引和搜索这些字段的内容。
1453

被折叠的 条评论
为什么被折叠?



