fos elastica populate 永远循环
fos elastica populate is looping forever
我不知道 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 中没有实体,它只是用于记录用户搜索。
好的,我找到了导致问题的原因:
fosElasticaBundle 中没有为批处理大小设置默认值,因此填充函数中的索引循环永远循环。
我请求 git 修复
我不知道 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 中没有实体,它只是用于记录用户搜索。
好的,我找到了导致问题的原因:
fosElasticaBundle 中没有为批处理大小设置默认值,因此填充函数中的索引循环永远循环。
我请求 git 修复