fos elastica で何が起こっているのかわかりません:
次の結果が表示される場合、エンティティにインデックスを付けようとすると:
hey@dotme:/var/www/v2-preprod/httpdocs/current# php app/console fos:elastica:populate
0/438 [>---------------------------] 0%
%message%
最初のエンティティ (ここでは 438 の結果) は正しくインデックス付けされていますが、次のエンティティには移動しないため、各エンティティを手動で入力する必要があります (その後、毎回プロセスを強制終了する必要があります)。
何か案が ?
fos elastica で適切に動作するように、jms シリアライザーをセットアップします。
ここに私の設定があります:
弾性検索
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 にはエンティティがないため、検索タイプの永続性はありません。ユーザー検索をログに記録するためだけです。