我有 flex 搜索2.2.1和“friendsofsymfony / elastica-bundle”:“〜3.0”,
我需要在索引中添加未分析的字段,我将配置添加到已提交的技能“字段”和“索引:not_analyzed”中,但是之后
app/console fos:elastica:populate --no-reset --index=directory --type=skill
在映射中还有
"skill": {
"properties": {
"skill": {
"type": "string"
},
这是我的配置:
directory:
finder: ~
types:
skill:
mappings:
id:
type: integer
skill:
type: integer
fields:
raw:
type: integer
index: not_analyzed
我需要更新FosElasticBundle吗?我做错了什么,任何想法,帮助
最佳答案
尝试将“index”更改为true而不是“not_analyzed”
directory:
finder: ~
types:
skill:
mappings:
id:
type: integer
skill:
type: integer
fields:
raw:
type: integer
index: true
关于php - FosElasticBundle未分析字段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36445839/