在尝试添加术语方面时,我面临术语被标记为单独单词的问题。例如,如果属性(字段)Kind
具有值medium kind of shirt
和large kind of shirt
,则术语变为 - medium
、large
、kind
、of
、shirt
。
为了解决这个问题,建议我更改映射以包含"index": "not_analyzed"
每个属性字段。问题是映射是动态生成的,例如-:
"attributes": {
"properties": {
"kind": {
"type": "string"
},
"color": {
"type": "string"
},
"size": {
"type": "string"
}
}
}
简单地设置"not_analyzed"
里面的位是"attributes"
行不通的。有没有办法为字段内的每个子字段设置索引属性attributes
?