【问题标题】:FosElasticBundle not AnalyzedfieldFosElasticBundle 未分析字段
【发布时间】:2020-03-08 01:55:51
【问题描述】:

我有弹性搜索 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

Mybe 需要更新 FosElasticBundle?我做错了什么,任何想法,帮助

【问题讨论】:

    标签: php symfony elasticsearch foselasticabundle


    【解决方案1】:

    尝试将“index”改为true而不是“not_analyzed”

        directory:
        finder: ~
        types:
                skill:
                 mappings:
                      id:
                         type: integer
                      skill:
                         type: integer
                         fields:
                            raw:
                                type: integer
                                index: true
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-06-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-11-02
      • 2017-04-10
      • 1970-01-01
      相关资源
      最近更新 更多