nervetattoo/elasticsearch — Issue #6: Support ELASTICSEARCH_URL env var for easier Heroku integration?
Author: nz
Created: 2012-02-13 17:51:24+00:00
State: open

Hey @nervetattoo,

There is an ElasticSearch addon now in alpha at Heroku, which provides the ELASTICSEARCH_URL environment variable to specify to an app where the index lives. Is there a way to facilitate integration for Heroku apps that might want to use your elasticsearch client?

In particular, do you think it would make sense to modify the `ElasticSearchTransportHTTP` class to support specifying a URL using an unparsed URL string? That way there's less burden on the user to parse out the hostname, port and index name at run time.

I'm thinking something that gets as close as possible to the following…

```php
$transport = new ElasticSearchTransportHTTP(getenv('ELASTICSEARCH_URL'));
```

What are your thoughts?

Also, if you have an account at Heroku and want to try out the addon, I can set that up, just send me a message with your account email address there :)

—Nick