Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/symfony/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Symfony2 elasticsearch在生产中返回500_Php_Symfony_<img Src="//i.stack.imgur.com/RUiNP.png" Height="16" Width="18" Alt="" Class="sponsor Tag Img">elasticsearch - Fatal编程技术网 elasticsearch,Php,Symfony,elasticsearch" /> elasticsearch,Php,Symfony,elasticsearch" />

Php Symfony2 elasticsearch在生产中返回500

Php Symfony2 elasticsearch在生产中返回500,php,symfony,elasticsearch,Php,Symfony,elasticsearch,在开发过程中,一切都起作用。当我切换到生产并尝试搜索时,我只得到500个错误。日志中没有写错误,所以我不明白什么是错误的 当去公园的时候。我看到产品保存在index app_dev中 但是,没有与应用程序相关的索引。为什么呢?为什么不在prod中创建索引 config.yml: fos_elastica: default_manager: orm clients: default: { host: localhost, port: 9200 } index

在开发过程中,一切都起作用。当我切换到生产并尝试搜索时,我只得到500个错误。日志中没有写错误,所以我不明白什么是错误的

当去公园的时候。我看到产品保存在index app_dev中

但是,没有与应用程序相关的索引。为什么呢?为什么不在prod中创建索引

config.yml:

fos_elastica:
    default_manager: orm
    clients:
        default: { host: localhost, port: 9200 }
    indexes:
        app:
            index_name: app_%kernel.environment%
            types:
                product:
                    mappings:
                        id:
                            type: integer
                        adminTitle:
                            type: string
                        base:
                            type: double
                        created_at:
                            type: date
                    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: Mp\ShopBundle\Entity\Product
                        provider: ~
                        listener:
                            immediate: ~
                        finder: ~
                        repository: Mp\ShopBundle\Repository\ProductRepository
                        elastica_to_model_transformer:
                            query_builder_method: findProductsBySearch
                            ignore_missing: true