FriendsOfSymfony/FOSElasticaBundle — pull request #413 by damienalexandre (2013-11-29 14:48:51+00:00)
Title: Serializer support in providers and mapping configuration fixes

Following [https://github.com/FriendsOfSymfony/FOSElasticaBundle/pull/341#discussion_r7997040] here is a PR merging #341 and #300, and fixing #332.

As we can define the Serializer I also allowed empty `mapping` for types so we can only define a persistence provider and :boom:: READY TO GO:

```yml
fos_elastica:
clients:
default: { host: localhost, port: 9200 }
serializer:
callback_class: FOS\ElasticaBundle\Serializer\Callback
serializer: serializer
indexes:
toto:
client: default
types:
Article:
#mappings: ~ or [] or {}, whatever
persistence:
driver: orm # orm, mongodb, propel are available
model: Toto\Bundle\CoreBundle\Entity\Article
provider: ~
```

Elasticsearch does not need any mapping to works, it built his own.

I also fixed the bulk indexing from #341, making use of the serializer callback in `ObjectSerializerPersister` directly.

Ping @lsmith77 and @leahaense.