ongr-io / ElasticsearchBundle

Symfony bundle for Elasticsearch with steroids
MIT License
313 stars 189 forks source link

Initialize the client lazily in IndexService #953

Open jdreesen opened 4 years ago

jdreesen commented 4 years ago

The client is lazily initialized when calling getClient(), which is used almost everywhere, except three places. To make this three places work, it's called in the constructor too, which makes it not lazy anymore.