/**
  * This is run when the service provider is registered with Silex.
  *
  * @param Application $app The Silex application which has the configuration data.
  *
  * @return void
  */
 public function register(Application $app)
 {
     $this->elasticsearch->setHosts([$app['elasticsearch.url']]);
     $this->client = $this->elasticsearch->build();
     $app['elasticsearch'] = $this;
 }