现在有两个索引,都想用IK的分词器,但是两个索引停用词词库不同,而且有的字段不想使用停用词,如何实现?
PUT stopword_test
{
"settings": {
"analysis": {
"analyzer": {
"my_ik_analyzer": {
"type": "custom",
"tokenizer": "ik_smart"
}
}
}
},
"mappings": {
"properties" : {
"wordtext" : {
"type" : "text",
"analyzer": "my_ik_analyzer",
"fielddata": true
}
}
}
}
PUT stopword_test
{
"settings": {
"analysis": {
"analyzer": {
"my_ik_analyzer": {
"type": "custom",
"tokenizer": "ik_smart"
}
}
}
},
"mappings": {
"properties" : {
"wordtext" : {
"type" : "text",
"analyzer": "my_ik_analyzer",
"fielddata": true
}
}
}
}
3 个回复
FFFrp
赞同来自:
libinjale2008
赞同来自:
spoofer
赞同来自:
感兴趣的话欢迎订阅我的小册:https://juejin.cn/book/7054754754529853475