FOSElasticaBundle for Symfony2. How to configure to connect to a cluster? FOSElasticaBundle for Symfony2. How to configure to connect to a cluster? elasticsearch elasticsearch

FOSElasticaBundle for Symfony2. How to configure to connect to a cluster?


you don't really need to list all your nodes, as ElasticSearch does load balance the cluster. However, it's still possible to do (e.g. in case the node you connect to goes offline). Keep in mind that it's just simple round robin though.

This is how you do it:

fos_elastica:    clients:        default:            servers:                 - { host: localhost, port: 9200 }                - { host: localhost, port: 9201 }