我不知道fos elastica发生了什么:
当我尝试索引我的实体时,如果显示以下结果:
hey@dotme:/var/www/v2-preprod/httpdocs/current# php app/console fos:elastica:populate
0/438 [>---------------------------] 0%
%message%
第一个实体(这里是438个结果)被正确编入索引,但它永远不会进入下一个实体,所以我必须手动填充每个实体(并且每次都必须杀死进程)
任何想法?
我设置了jms序列化程序,以便正确使用fos elastica。
这是我的配置:
fos_elastica:
clients:
default: { host: localhost, port: 9200, logger: false }
serializer:
callback_class: FOS\ElasticaBundle\Serializer\Callback
serializer: serializer
indexes:
recetas:
client: default
settings:
index:
analysis:
analyzer:
custom_search_analyzer:
type: custom
tokenizer: standard
filter : [standard, lowercase, asciifolding]
custom_index_analyzer:
type: custom
tokenizer: standard
filter : [standard, lowercase, asciifolding]
filter:
custom_filter:
type: "edgeNGram"
side: front
min_gram: 3
max_gram: 20
types:
Recipe:
mappings:
name:
search_analyzer: custom_search_analyzer
index_analyzer: custom_index_analyzer
type: string
slug:
search_analyzer: custom_search_analyzer
index_analyzer: custom_index_analyzer
type: string
country:
type: string
seen:
type: integer
persistence:
driver: orm # orm, mongodb, propel are available
model: recetas\AppBundle\Entity\Recipe\Recipe
provider:
debug_logging: false
listener: ~
finder: ~
serializer:
groups: [elastica]
Ingredient:
mappings:
name:
search_analyzer: custom_search_analyzer
index_analyzer: custom_index_analyzer
type: string
slug:
search_analyzer: custom_search_analyzer
index_analyzer: custom_index_analyzer
type: string
seen:
type: integer
persistence:
driver: orm # orm, mongodb, propel are available
model: recetas\AppBundle\Entity\Recipe\Ingredient
provider:
debug_logging: false
listener: ~
finder: ~
serializer:
groups: [elastica]
Search:
mappings:
value:
search_analyzer: custom_search_analyzer
index_analyzer: custom_index_analyzer
type: string
date:
type: date
format: basic_date_time
没有搜索类型的持久性,因为symfony中没有实体,它只是用于记录用户搜索。
答案 0 :(得分:0)
fosElasticaBundle中没有为batch-size设置默认值,因此填充函数中的索引循环将永远循环。
我通过修复
请求git