0

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 にはエンティティがないため、検索タイプの永続性はありません。ユーザー検索をログに記録するためだけです。

4

1 に答える 1

0

わかりましたので、問題の原因を見つけました:

fosElasticaBundle にはバッチサイズのデフォルト値が設定されていなかったため、関数を設定する際のインデックス作成ループが永遠にループしていました。

私は修正を加えてgitをプルリクエストしました

于 2015-03-30T07:20:34.420 に答える