Symfony3 foselasticabundance文档示例不工作


Symfony3 FOSElasticaBundle doc example not working


我正在尝试设置foselasticabundance。
Composer json条目:

"friendsofsymfony/elastica-bundle": "^3.2"

我遵循官方文档教程,
但这一行不工作:

$finder = $this->container->get('fos_elastica.finder.app.user');

error I get:

您请求了一个不存在的服务"fos_elastica.index.app.user"。

你知道为什么吗?

检查事项:

  • AppKernel.php包含'new FOS' elasticbundle ' foselasticbundle (),'
  • 配置选项卡下的分析器未显示'FOSElastica'为启用:

配置。yml:

fos_elastica:
    clients:
        default: { host: localhost, port: 9200 }
    indexes:
        app:
            types:
                user:
                    mappings:
                        email: ~
                    persistence:
                        # the driver can be orm, mongodb, phpcr or propel
                        # listener and finder are not supported by
                        # propel and should be removed
                        driver: orm
                        model: AppBundle'Entity'User
                        provider: ~
                        listener: ~
                        finder: ~

提前感谢任何见解,伙计们:)

发现bundle没有正确安装。

"minimum-stability": "dev",

的作曲家。新安装时的Json文件