我已经安装了 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
,即使是隐藏对象也会创建索引。
如何仅索引活动对象?也许使用分析器或类似的东西?
提前致谢!