elasticsearch,Php,Symfony,elasticsearch" /> elasticsearch,Php,Symfony,elasticsearch" />

Php Symfony弹性束误差

Php Symfony弹性束误差,php,symfony,elasticsearch,Php,Symfony,elasticsearch,嘿,伙计们,我刚在我的项目上安装了弹性搜索包,在我使用 php app/console fos:elastica:populate 命令,我得到以下代码: Resetting app 17/17 [============================] 100% Populating app/professionalRefreshing app [Symfony\Component\Debug\Exception\ContextErrorException] Notice

嘿,伙计们,我刚在我的项目上安装了弹性搜索包,在我使用

php app/console fos:elastica:populate
命令,我得到以下代码:

Resetting app
 17/17 [============================] 100%
Populating app/professionalRefreshing app


  [Symfony\Component\Debug\Exception\ContextErrorException]  
  Notice: Array to string conversion                         
如果我尝试获取我的弹性体上的所有信息,我可以看到它们,但是当我尝试在我的控制器上使用它时,我得到的是空值

有什么帮助吗

谢谢

//////更新

fos_elastica:
    clients:
        default: ...
    indexes:
        app: 
            types:
                professional:
                    properties:
                        name: ~
                    persistence:
                        driver: orm
                        model: AppBundle\Entity\Professional
                        provider: ~
                        finder: ~

您是否设置了基本捆绑包配置并定义了如下代码所示的索引类型

应在计算机中启用端口9200

#app/config/config.yml
fos_elastica:
    clients:
        default: { host: localhost, port: 9200 }
    indexes:
        app: ~


解决方案是使用elastic cloud 1.7版本。

您似乎在映射过程中弄乱了一些东西,例如,您试图将实体中的一对多属性作为ES中的字符串字段进行索引。@barat但现在我只是映射name属性,它是一个stringYes,我实际使用的是elastic cloud,而且似乎都是okai,我用这个代码编辑我的问题
fos_elastica:
indexes:
    app:
        types:
            user:
                properties:
                    username: ~
                    firstName: ~
                    lastName: ~
                    email: ~