0
votes

i don t know what is going on with fos elastica :

when i try to index my entities if shows the following result :

hey@dotme:/var/www/v2-preprod/httpdocs/current# php app/console fos:elastica:populate
 0/438 [>---------------------------]   0%
%message%

the first entity ( here 438 results ) is correctly indexed but it never goes to the next entity so i have to populate each entities manually ( and have to kill process everytime after )

any idea ?

i setup jms serializer in order to properly work with fos elastica.

here is my config:

ELASTIC SEARCH

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

no persistence for the search type because there is no entity in symfony, it s just for logging user search.

1
you're probably going to need to share your config for foselastica - Derick F
@DerickF i updated with my config - Charles-Antoine Fournel

1 Answers

0
votes

okay so i found what caused the issue :

there was no default value set for the batch-size in fosElasticaBundle so the indexing loop in populating functions was looping forever .

i pull requested the git with a fix