php - FosElasticBundle未分析字段

标签 php symfony elasticsearch foselasticabundle

我有 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/

相关文章:

symfony - 使用 FOSOAuthServerBundle 获取 Controller 上的当前客户端

mongodb - Symfony3 + "Authentication request could not be processed due to a system"

symfony - 尝试使用 Symfony 组件并遇到命名空间问题

elasticsearch - 如何以最快的方式删除所有Elasticsearch数据

php - 可更改的自定义 JSON Ajax 循环

javascript - 复选框选择运行 javascript 调用,但未获取所有值

php - 如果字符串为空,让 php sprintf 忽略 return

php - 关闭全局 session 变量作为注销按钮

elasticsearch - 从ElastiSearch的Java API中的SearchResponse中排除字段

elasticsearch - Elasticsearch中来自字段的不正确的唯一值