title: AttributeError: 'module' object has no attribute 'ElasticSearchError' : Using Haystack Elasticsearch
body: <p>Using Django &amp; Haystack with ElasticSearch.</p>
  
  <p>After installing haystack and ES, and Rebuilding Index </p>
  
  <pre><code>./manage.py rebuild_index 
  </code></pre>
  
  <p>WARNING: This will irreparably remove EVERYTHING from your search index in connection 'default'.
  Your choices after this are to restore from backups or rebuild via the <code>rebuild_index</code> command.
  Are you sure you wish to continue? [y/N] y</p>
  
  <pre><code>Removing all documents from your index because you said so.
  All documents removed.
  Indexing 1039 &lt;django.utils.functional.__proxy__ object at 0x10ca3ded0&gt;.
  
  AttributeError: 'module' object has no attribute 'ElasticSearchError'
  </code></pre>
  
  <p>Updating index has the same problem</p>
  
  <pre><code>/manage.py update_index 
  Indexing 1039 &lt;django.utils.functional.__proxy__ object at 0x10ea49d90&gt;.
  AttributeError: 'module' object has no attribute 'ElasticSearchError'
  </code></pre>
  
  <p>Clear index works fine though ( probably because there is no index )</p>
  
  <pre><code>./manage.py clear_index   
  
  WARNING: This will irreparably remove EVERYTHING from your search index in connection    'default'.
  Your choices after this are to restore from backups or rebuild via the `rebuild_index` command.
  Are you sure you wish to continue? [y/N] y
  </code></pre>
  
  <p>Removing all documents from your index because you said so.
  All documents removed.</p>
  
  <p><strong>Versions</strong> </p>
  
  <p>django-haystack==2.0.0-beta<br/>
  pyelasticsearch==0.5<br/>
  elasticsearch==0.20.6</p>
  
  <p>localhost:9200 says : </p>
  
  <pre><code>{
    "ok" : true,
    "status" : 200,
    "name" : "Jigsaw",
    "version" : {
      "number" : "0.20.6",
      "snapshot_build" : false
    },
    "tagline" : "You Know, for Search"
  }
  </code></pre>
  
  <p>Haystack settings :</p>
  
  <pre><code>HAYSTACK_CONNECTIONS = {
      'default': {
          'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
          'URL': 'http://127.0.0.1:9200/',
          'INDEX_NAME': 'haystack',
      },
  }
  </code></pre>
  
  <p>search_indexes.py :</p>
  
  <pre><code>import datetime
  import haystack
  from haystack import indexes
  from app.models import City
  
  class CityIndex(indexes.SearchIndex, indexes.Indexable):
      text = indexes.CharField(document=True, use_template=True)
      name = indexes.CharField(model_attr='name')
      state = indexes.CharField(model_attr='state')
      country = indexes.CharField(model_attr='country')
      lat = indexes.FloatField(model_attr='latitude')
      lon = indexes.FloatField(model_attr='longitude')
      alt = indexes.FloatField(model_attr='altitude')
      pop = indexes.IntegerField(model_attr='population')
  
      def get_model(self):
          return City
  </code></pre>
  
  <p><strong>Any help - why I am getting error ?</strong></p>