我想在多个字段中使用yii2-elasticsearch进行全文搜索,其中所有字段都在带有指定分析器的文档中进行检查。
所以,如果我有一个映射:
"settings": {
"analysis": {
"analyzer": {
"lowercase_keyword": {
"tokenizer": "keyword",
"filter": [ "lowercase"]
}
}
}
},
"mappings" : {
"typeName" :{
"properties" : {
"id" : {
"type" : "string",
"index" : "not_analyzed"
},
"company_name" : {
"type" : "string",
"index" : "analyzed",
"analyzer" : "lowercase_keyword",
},
"product_name" : {
"type" : "string",
"index" : "analyzed",
"analyzer" : "lowercase_keyword",
},
"product_desc" : {
"type" : "string",
"index" : "not_analyzed"
},
}
}
}
}
我想搜索company_name,product_name,product_desc。
中的单词答案 0 :(得分:0)