【发布时间】:2014-04-04 01:09:04
【问题描述】:
我已经安装了FOSElasticaBundle,我的配置fos_elastica.yml如下:
fos_elastica:
clients:
default: { host: localhost, port: 9200 }
indexes:
test:
client: default
index_name : %elastica_index_name%
types:
exhibition:
mappings:
name : { boost: 100 }
company: { boost: 9 }
directions: { boost: 8}
tags: { boost: 7 }
description : { boost: 6 }
status : ~
persistence:
driver: orm
model: Test\MainBundle\Entity\Exhibition
finder: ~
provider: ~
listener:
is_indexable_callback: "isPublic"
坚持is_indexable_callback 有效。但是当我运行fos:elastica:populate 时,即使是隐藏对象也会创建索引。
如何仅索引活动对象?也许使用分析器或类似的东西?
提前致谢!
【问题讨论】:
标签: symfony elasticsearch foselasticabundle