0

I am newbie to Django-haystack. I got an error while following Django-Haystack documentation.

Command execution order, I followed:

  1. I started elasticsearch server (1.7.3) using command prompt and I am able to access http://127.0.0.1:9200/

  2. python manage.py rebuild_index

Output:

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

Error:

packages\haystack\backends\elasticsearch_backend.py", line 28, in raise MissingDependency("The 'elasticsearch' backend requires the installation of 'elasticsearch'. Please refer to the documentation.")

haystack.exceptions.MissingDependency: The 'elasticsearch' backend requires the installation of 'elasticsearch'. Please refer to the documentation.

Current Platform (Windows): 1. Django 1.8 2. elasticsearch: 1.9.0 (installed through pip) 3. pyelasticsearch: 0.0.5 (installed through pip) 4. elasticseach: 1.7.3 (downloaded to start elasticsearch server)

I have tried adding the 'elasticsearch' also to my installed apps but the same error exists.

It seems there is version compatibility problems (perhaps in pyelasticseach) as I found some others also faced the same issue. Any help would be appreciated. Thanks.

user3715032
  • 73
  • 1
  • 8
  • What is the output of `pip freeze`? – solarissmoke Oct 22 '15 at 11:10
  • backports.ssl-match-hostname==3.4.0.2 Django==1.8.5 django-haystack==2.4.0 djangorestframework==3.2.3 easy-thumbnails==2.2 elasticsearch==1.9.0 elasticsearch-curator==3.3.0 enum34==1.0.4 gevent==1.0.2 gevent-socketio==0.3.5rc2 gevent-websocket==0.9.5 greenlet==0.4.9 idna==2.0 MySQL-python==1.2.5 ndg-httpsclient==0.4.0 nltk==3.0.5 numpy==1.6.1 Pillow==2.9.0 pusher==1.2.3 pyasn1==0.1.8 pycparser==2.14 pyelasticsearch==0.0.5 PyMySQL==0.6.6 pyOpenSSL==0.15.1 pyparsing==2.0.3 python-dateutil==2.4.2 python-mimeparse==0.1.4 requests==2.8.1 simplejson==3.8.0 six==1.10.0 urllib3==1.12 – user3715032 Oct 22 '15 at 11:13
  • I have tried installing other versions of pyelasticsearch but doesn't seem to work. – user3715032 Oct 22 '15 at 11:15
  • Are you able to track the issue. Please reply. – user3715032 Oct 22 '15 at 11:51
  • I'm stumped - can't see why it still fails. – solarissmoke Oct 22 '15 at 11:58
  • I'm not sure that need both `elasticsearch 1.9.0` and `pyelasticsearch 0.0.5`. Just plain elasticsearch is the 'official' module, while pyelasticsearch is an unofficial version that predates the official version, if that makes sense. Your pyelasticsearch is also quite old, the most up-to-date version being 1.4. Try uninstalling it perhaps? – cssko Oct 23 '15 at 11:44
  • I tracked down the issue. The problem was with Haystack version. http://stackoverflow.com/questions/28257502/cant-get-elasticsearch-working-with-django – user3715032 Oct 24 '15 at 07:04

0 Answers0