首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >ElasticaSearch不被识别的选项index_analyzer search_analyzer映射

ElasticaSearch不被识别的选项index_analyzer search_analyzer映射
EN

Stack Overflow用户
提问于 2018-05-28 12:28:35
回答 1查看 229关注 0票数 0

我被Symfony错误阻止了:

"fos_elastica.indexes.optro.types.technical_assistance“下的未识别选项"index_analyzer,search_analyzer,映射”

我使用Symfony 3.4.11和5.03。

怎么了?文件缩进?

Config文件的一部分:

代码语言:javascript
复制
types:
  technical_assistance:
    index_analyzer: my_nGram_index_analyzer
    search_analyzer: my_nGram_search_analyzer
    mappings:
      subject: { boost: 2 }
      description: ~
      equipment_reference: ~
      filename: ~
      trackingNumber: ~
      requester:
        type: "object"
        properties:
          first_name: ~
          last_name: ~
      section:
        type: "object"
        properties:
          name: ~
          translatedNames: ~
      messages:
        type: "object"
        properties:
          content: { boost: 0.5 }
          filename: ~
    persistence:
      driver: orm
      model: Optro\HelpdeskBundle\Entity\TechnicalAssistance
      provider: ~
      listener: ~
      finder:
        service: optro.finder.raw.technical_assistance
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-05-28 13:40:41

必须为每个相关字段声明自定义分析器。据我所知,你不能在全球范围内宣布。

代码语言:javascript
复制
types:
    technical_assistance:
         properties:
             subject:
                 boost: 2
                 index_analyzer: my_nGram_index_analyzer
                 search_analyzer: my_nGram_search_analyzer
             description:
                 index_analyzer: my_nGram_index_analyzer
                 search_analyzer: my_nGram_search_analyzer
             ...
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50566479

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档