I'm currently trying to use FOSElastica and I'm having trouble with the configuration. I want to use a serializer with most of my entities, but I want to specify the mapping for a particular entity, how could I do this ?

I've tried defining the "properties" options but with the "serializer" option defined it just seems to ignore it.

I'd want to do something like this, but the "table_content" properties is just ignored.

fos_elastica:
    serializer: 
        serializer: jms_serializer
    clients:
        default: { host: localhost, port: 9200 }
    indexes:
        table_content: 
            types: 
                table_content: 
                    properties:
                        id: ~
                    persistence: 
                        driver: orm 
                        model: TAMAS\AstroBundle\Entity\TableContent
        astonomical_object:
            types:
                astonomical_object:
                    serializer:
                        groups: [astonomicalobject]
                        serialize_null: true
                    persistence:
                        driver: orm
                        model: TAMAS\AstroBundle\Entity\AstronomicalObject

0 Answers