在开发过程中一切正常。当我切换到生产并尝试搜索时,我只得到500错误。日志中没有写错误,所以我不明白什么是错的?
前往http://localhost:9200/_plugin/head/时。我看到产品保存在索引app_dev中。
但是没有与app相关的索引。这是为什么?为什么不在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