elasticsearch - Unable to rebuild index in django haystack -


i trying run manage.py rebuild_index getting below error.

`(django_project)deep@deep-thinkpad-edge:~/doroko$ python manage.py rebuild_index no handlers found logger "django_facebook.models" /home/deep/.virtualenvs/django_project/local/lib/python2.7/site-packages/django/utils/image.py:150: removedindjango18warning: support pil removed in django 1.8. please uninstall & install pillow instead.   removedindjango18warning  system check identified issues:  warnings: ?: (1_6.w001) project unittests may not execute expected.     hint: django 1.6 introduced new default test runner. looks project generated using django 1.5 or earlier. should ensure tests running & behaving expected. see https://docs.djangoproject.com/en/dev/releases/1.6/#new-test-runner more information. system check identified issues:  warnings: ?: (1_6.w001) project unittests may not execute expected.     hint: django 1.6 introduced new default test runner. looks project generated using django 1.5 or earlier. should ensure tests running & behaving expected. see https://docs.djangoproject.com/en/dev/releases/1.6/#new-test-runner more information.  warning: irreparably remove search index in connection 'default'. choices after restore backups or rebuild via `rebuild_index` command. sure wish continue? [y/n] y removing documents index because said so. failed clear elasticsearch index: connectionerror(('connection aborted.', error(111, 'connection refused'))) caused by: protocolerror(('connection aborted.', error(111, 'connection refused'))) documents removed. system check identified issues:  warnings: ?: (1_6.w001) project unittests may not execute expected.     hint: django 1.6 introduced new default test runner. looks project generated using django 1.5 or earlier. should ensure tests running & behaving expected. see https://docs.djangoproject.com/en/dev/releases/1.6/#new-test-runner more information. indexing 34 wishs error:root:error updating feed using default  traceback (most recent call last):   file "/home/deep/.virtualenvs/django_project/local/lib/python2.7/site-packages/haystack/management/commands/update_index.py", line 189, in handle_label     self.update_backend(label, using)   file "/home/deep/.virtualenvs/django_project/local/lib/python2.7/site-packages/haystack/management/commands/update_index.py", line 234, in update_backend     do_update(backend, index, qs, start, end, total, self.verbosity)   file "/home/deep/.virtualenvs/django_project/local/lib/python2.7/site-packages/haystack/management/commands/update_index.py", line 89, in do_update     backend.update(index, current_qs)   file "/home/deep/.virtualenvs/django_project/local/lib/python2.7/site-packages/haystack/backends/elasticsearch_backend.py", line 164, in update     prepped_data = index.full_prepare(obj)   file "/home/deep/.virtualenvs/django_project/local/lib/python2.7/site-packages/haystack/indexes.py", line 207, in full_prepare     self.prepared_data = self.prepare(obj)   file "/home/deep/doroko/feed/search_indexes.py", line 16, in prepare     data = super(feedindex, self).prepare(obj)   file "/home/deep/.virtualenvs/django_project/local/lib/python2.7/site-packages/haystack/indexes.py", line 198, in prepare     self.prepared_data[field.index_fieldname] = field.prepare(obj)   file "/home/deep/.virtualenvs/django_project/local/lib/python2.7/site-packages/haystack/fields.py", line 159, in prepare     return self.convert(super(charfield, self).prepare(obj))   file "/home/deep/.virtualenvs/django_project/local/lib/python2.7/site-packages/haystack/fields.py", line 165, in convert     return six.text_type(value)   file "/home/deep/.virtualenvs/django_project/local/lib/python2.7/site-packages/django/db/models/manager.py", line 81, in __str__     in opts.concrete_managers + opts.abstract_managers stopiteration traceback (most recent call last):   file "manage.py", line 10, in <module>     execute_from_command_line(sys.argv)   file "/home/deep/.virtualenvs/django_project/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line     utility.execute()   file "/home/deep/.virtualenvs/django_project/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 377, in execute     self.fetch_command(subcommand).run_from_argv(self.argv)   file "/home/deep/.virtualenvs/django_project/local/lib/python2.7/site-packages/django/core/management/base.py", line 288, in run_from_argv     self.execute(*args, **options.__dict__)   file "/home/deep/.virtualenvs/django_project/local/lib/python2.7/site-packages/django/core/management/base.py", line 338, in execute     output = self.handle(*args, **options)   file "/home/deep/.virtualenvs/django_project/local/lib/python2.7/site-packages/haystack/management/commands/rebuild_index.py", line 16, in handle     call_command('update_index', **options)   file "/home/deep/.virtualenvs/django_project/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 115, in call_command     return klass.execute(*args, **defaults)   file "/home/deep/.virtualenvs/django_project/local/lib/python2.7/site-packages/django/core/management/base.py", line 338, in execute     output = self.handle(*args, **options)   file "/home/deep/.virtualenvs/django_project/local/lib/python2.7/site-packages/haystack/management/commands/update_index.py", line 184, in handle     return super(command, self).handle(*items, **options)   file "/home/deep/.virtualenvs/django_project/local/lib/python2.7/site-packages/django/core/management/base.py", line 503, in handle     label_output = self.handle_label(label, **options)   file "/home/deep/.virtualenvs/django_project/local/lib/python2.7/site-packages/haystack/management/commands/update_index.py", line 189, in handle_label     self.update_backend(label, using)   file "/home/deep/.virtualenvs/django_project/local/lib/python2.7/site-packages/haystack/management/commands/update_index.py", line 234, in update_backend     do_update(backend, index, qs, start, end, total, self.verbosity)   file "/home/deep/.virtualenvs/django_project/local/lib/python2.7/site-packages/haystack/management/commands/update_index.py", line 89, in do_update     backend.update(index, current_qs)   file "/home/deep/.virtualenvs/django_project/local/lib/python2.7/site-packages/haystack/backends/elasticsearch_backend.py", line 164, in update     prepped_data = index.full_prepare(obj)   file "/home/deep/.virtualenvs/django_project/local/lib/python2.7/site-packages/haystack/indexes.py", line 207, in full_prepare     self.prepared_data = self.prepare(obj)   file "/home/deep/doroko/feed/search_indexes.py", line 16, in prepare     data = super(feedindex, self).prepare(obj)   file "/home/deep/.virtualenvs/django_project/local/lib/python2.7/site-packages/haystack/indexes.py", line 198, in prepare     self.prepared_data[field.index_fieldname] = field.prepare(obj)   file "/home/deep/.virtualenvs/django_project/local/lib/python2.7/site-packages/haystack/fields.py", line 159, in prepare     return self.convert(super(charfield, self).prepare(obj))   file "/home/deep/.virtualenvs/django_project/local/lib/python2.7/site-packages/haystack/fields.py", line 165, in convert     return six.text_type(value)   file "/home/deep/.virtualenvs/django_project/local/lib/python2.7/site-packages/django/db/models/manager.py", line 81, in __str__     in opts.concrete_managers + opts.abstract_managers stopiteration` 

this search_indexes.py file model.

import datetime haystack import indexes feed.models import wish  class feedindex(indexes.searchindex, indexes.indexable):     text = indexes.charfield(document=true, use_template=true)     wish_text = indexes.charfield(model_attr='wish_text',null=true)     tags = indexes.charfield(model_attr='tags')     added = indexes.datetimefield(model_attr='added')      def get_model(self):         return wish     def prepare_wish_text(self, obj):         return "wish"     def prepare(self, obj):         data = super(feedindex, self).prepare(obj)         data["_boost"] = 1.5         return data 

following versions used :

django==1.7.6 django-haystack==2.3.1 elasticsearch==1.4.0 pyelasticsearch==0.5 

testing seems suggest comes if search template incorrectly configured.

double check fields in search template , find incorrect 1 , issue should resolve.

https://groups.google.com/forum/#!topic/django-haystack/inxrimoyhtq


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -