title: FOSElastica + JMs serializer malformed data
body: <p>I installed ElasticSearch 6 with their Docker image and everything work well.</p>
  
  <p>Then I installed and configured FOSElastica like the doc said.</p>
  
  <p>This is the following config of fos_elastica</p>
  
  <pre><code>fos_elastica:
      clients:
          default: { host: '%env(ELASTICSEARCH_HOST)%', port: '%env(ELASTICSEARCH_PORT)%' }
      serializer:
          serializer: jms_serializer
      indexes:
          app:
              client: default
              types:
                  user:
                      serializer:
                          groups: [elastica]
                      persistence:
                          driver: orm
                          model: AppBundle\Entity\User
                          provider: ~
                          listener: ~
                          finder: ~
  </code></pre>
  
  <p>And the model of my User entity to give the <code>elastica</code> serializer group to some field</p>
  
  <pre><code>AppBundle\Entity\User:
      exclusion_policy: ALL
      properties:
          firstname:
              expose: true
              groups: [elastica, list, details]
          lastname:
              expose: true
              groups: [elastica, list, details]
          locale:
              expose: true
              groups: [elastica, details]
  </code></pre>
  
  <p>The serializer is working well for my API and is well configurated</p>
  
  <pre><code> jms_serializer:
      metadata:
          auto_detection: true
          directories:
              AppBundle:
                  namespace_prefix: 'AppBundle'
                  path: '%kernel.project_dir%/config/serializer'
  </code></pre>
  
  <p>When I'm trying to populate ElasticSearch I get, I think a bad serialization error</p>
  
  <pre><code>In Http.php line 181:
  
  [Elastica\Exception\ResponseException]                                              
  Malformed action/metadata line [3], expected START_OBJECT but found [VALUE_STRING]
  </code></pre>
  
  <p>I tried to set field typing using <code>properties.type</code> config in the fos_elastica configuration without success.</p>
  
  <p>I tried with another entity and I get the same error.</p>
  
  <p>I have already work with FOSElasticaBundle ~1year ago on the same project and population was working... </p>
  
  <p>I didn't success to find where is the problem, if there is a JMSSerializer/FOSElastica bug or a misconfig</p>
  
  <p>Did I miss something in the configuration ? Do you already had this issue ?</p>