I´m trying to update a project from Haystack 1.X to Haystack 2.0 in order to use Elasticsearch backend but i am not confident if it´s running correctly.
*How i have integrated Haystack 2.0 Beta / Elasticsearch*
Installed / Configured modules by following Haystack Official Documentation:
- Haystack 2.0 BETA Version
- Elasticsearch v0.18.7 (i haven´t modified the yaml file because i´m not developing locally)
- Pyelasticsearch v0.0.5 from toastdriven (don´t use it from rhec, it seems to be incomplete for this purpose)
- Requests v0.10.6
- Simplejson v2.4.0
Migrated Haystack Indexes from 1.XX to 2.0 Version as recommends Haystack Official Documentation:
- Removed old haystack settings and created HAYSTACK_CONNECTIONS targeting elasticSearch, put it as unique and default engine.
- Used SearchIndex and Indexable for my indexes, added get_model and index_queryset functions - Removed get_queryset deprecated function and the registration statements
*Issue:*
The point is that unfortunately while i´m trying to rebuild indexes raises this Error:
> $ python manage.py rebuild_index
> Removing all documents from your index because you said so.
> Failed to clear Elasticsearch index: Non-OK status code returned (404) > containing 'IndexMissingException[[haystack] missing]'.
> All documents removed.
Despite of that haystack rebuild indexes. I was trying to know more about this issue but i haven´t found useful information regarding it. Could anyone give me some clues about this exception?
> --settings=elasticsearch_settings > /Library/virtualenvs/lmb/lib/python2.6/site-packages/django/db/__init__.py: 60: > DeprecationWarning: Short names for ENGINE in database configurations are > deprecated. Prepend default.ENGINE with 'django.db.backends.' > DeprecationWarning > Creating test database for alias 'default'... > Clearing out Elasticsearch... > .............Clearing out Elasticsearch... > .Clearing out Elasticsearch... > Failed to clear Elasticsearch index: Non-OK status code returned (404) > containing 'IndexMissingException[[test_default] missing]'. > .Clearing out Elasticsearch... > .Clearing out Elasticsearch... > .Clearing out Elasticsearch... > .Clearing out Elasticsearch... > .Clearing out Elasticsearch... > .Clearing out Elasticsearch... > ......................Clearing out Elasticsearch... > .Clearing out Elasticsearch... > .Clearing out Elasticsearch... > Failed to fetch More Like This from Elasticsearch for document > 'core.mockmodel_deferred_foo.1': Non-OK status code returned (500) > containing 'ElasticSearchException[document missing]'. > .Clearing out Elasticsearch... > .Clearing out Elasticsearch... > .Reloading data... > Clearing out Elasticsearch... > ......................Clearing out Elasticsearch... > .Clearing out Elasticsearch... > . > ---------------------------------------------------------------------- > Ran 71 tests in 10.702s
> OK > Destroying test database for alias 'default'...
> To post to this group, send email to django-haystack@googlegroups.com. > To unsubscribe from this group, send email to > django-haystack+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-haystack?hl=en.
I am also getting this error. It is a serious problem if you set SILENTLY_FAIL to False in the Haystack connection settings. In my case I cannot even rebuild the index because it loudly crashes on this error.
Is this a bug in Haystack? Does anyone know what the real cause of it is?
Below is my traceback.
$ bin/manage rebuild_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
Removing all documents from your index because you said so. Traceback (most recent call last): File "bin/manage", line 42, in <module> djangorecipe.manage.main('dje.settings') File "/Users/haitran/.buildout/eggs/djangorecipe-1.1.2-py2.6.egg/djangorecipe/ma nage.py", line 19, in main management.execute_manager(mod) File "/Users/haitran/.buildout/eggs/Django-1.4-py2.6.egg/django/core/management/ __init__.py", line 459, in execute_manager utility.execute() File "/Users/haitran/.buildout/eggs/Django-1.4-py2.6.egg/django/core/management/ __init__.py", line 382, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/Users/haitran/.buildout/eggs/Django-1.4-py2.6.egg/django/core/management/ base.py", line 196, in run_from_argv self.execute(*args, **options.__dict__) File "/Users/haitran/.buildout/eggs/Django-1.4-py2.6.egg/django/core/management/ base.py", line 232, in execute output = self.handle(*args, **options) File "/Users/haitran/.buildout/eggs/django_haystack-2.0.0_beta-py2.6.egg/haystac k/management/commands/rebuild_index.py", line 14, in handle call_command('clear_index', **options) File "/Users/haitran/.buildout/eggs/Django-1.4-py2.6.egg/django/core/management/ __init__.py", line 150, in call_command return klass.execute(*args, **defaults) File "/Users/haitran/.buildout/eggs/Django-1.4-py2.6.egg/django/core/management/ base.py", line 232, in execute output = self.handle(*args, **options) File "/Users/haitran/.buildout/eggs/django_haystack-2.0.0_beta-py2.6.egg/haystac k/management/commands/clear_index.py", line 41, in handle backend.clear() File "/Users/haitran/.buildout/eggs/django_haystack-2.0.0_beta-py2.6.egg/haystac k/backends/elasticsearch_backend.py", line 224, in clear self.conn.refresh(indexes=[self.index_name]) File "/Users/haitran/repos/dejacode/enterprise/pyelasticsearch.py", line 412, in refresh response = self._send_request('POST', path) File "/Users/haitran/repos/dejacode/enterprise/pyelasticsearch.py", line 213, in _send_request raise ElasticSearchError("Non-OK status code returned (%d) containing %r." % (resp.status_code, prepped_response.get('error', prepped_response))) pyelasticsearch.ElasticSearchError: Non-OK status code returned (404) containing u'IndexMissingException[[haystack] missing]'.
>> To post to this group, send email to django-haystack@googlegroups.com. >> To unsubscribe from this group, send email to >> django-haystack+unsubscribe@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/django-haystack?hl=en.
On Friday, 3 August 2012 06:15:07 UTC+1, Kevin Tran wrote:
> I am also getting this error. It is a serious problem if you set SILENTLY_FAIL to False in the Haystack connection settings. In my case I cannot even rebuild the index because it loudly crashes on this error.
> Is this a bug in Haystack? Does anyone know what the real cause of it is?
> Below is my traceback.
> $ bin/manage rebuild_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
> Removing all documents from your index because you said so.
> Traceback (most recent call last):
> File "bin/manage", line 42, in <module>
> djangorecipe.manage.main('dje.settings')
> File "/Users/haitran/.buildout/eggs/djangorecipe-1.1.2-py2.6.egg/djangorecipe/ma nage.py", line 19, in main
> management.execute_manager(mod)
> File "/Users/haitran/.buildout/eggs/Django-1.4-py2.6.egg/django/core/management/ __init__.py", line 459, in execute_manager
> utility.execute()
> File "/Users/haitran/.buildout/eggs/Django-1.4-py2.6.egg/django/core/management/ __init__.py", line 382, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
> File "/Users/haitran/.buildout/eggs/Django-1.4-py2.6.egg/django/core/management/ base.py", line 196, in run_from_argv
> self.execute(*args, **options.__dict__)
> File "/Users/haitran/.buildout/eggs/Django-1.4-py2.6.egg/django/core/management/ base.py", line 232, in execute
> output = self.handle(*args, **options)
> File "/Users/haitran/.buildout/eggs/django_haystack-2.0.0_beta-py2.6.egg/haystac k/management/commands/rebuild_index.py", line 14, in handle
> call_command('clear_index', **options)
> File "/Users/haitran/.buildout/eggs/Django-1.4-py2.6.egg/django/core/management/ __init__.py", line 150, in call_command
> return klass.execute(*args, **defaults)
> File "/Users/haitran/.buildout/eggs/Django-1.4-py2.6.egg/django/core/management/ base.py", line 232, in execute
> output = self.handle(*args, **options)
> File "/Users/haitran/.buildout/eggs/django_haystack-2.0.0_beta-py2.6.egg/haystac k/management/commands/clear_index.py", line 41, in handle
> backend.clear()
> File "/Users/haitran/.buildout/eggs/django_haystack-2.0.0_beta-py2.6.egg/haystac k/backends/elasticsearch_backend.py", line 224, in clear
> self.conn.refresh(indexes=[self.index_name])
> File "/Users/haitran/repos/dejacode/enterprise/pyelasticsearch.py", line 412, in refresh
> response = self._send_request('POST', path)
> File "/Users/haitran/repos/dejacode/enterprise/pyelasticsearch.py", line 213, in _send_request
> raise ElasticSearchError("Non-OK status code returned (%d) containing %r." % (resp.status_code, prepped_response.get('error', prepped_response)))
> pyelasticsearch.ElasticSearchError: Non-OK status code returned (404) containing u'IndexMissingException[[haystack] missing]'.
> On Friday, March 30, 2012 6:34:31 PM UTC-7, Stephen Burrows wrote:Don't worry about those messages; they're annoying, but AFAICT they don't signal anything bad.
> On Fri, Mar 30, 2012 at 4:47 AM, Eloi Cuevas <f15...@gmail.com> wrote:
> More about my Haystack & ES Enviroment:
> Python 2.6.1Django 1.3.1
> --
> You received this message because you are subscribed to the Google Groups "django-haystack" group.
On Thursday, August 2, 2012 10:15:07 PM UTC-7, Kevin Tran wrote:
> I am also getting this error. It is a serious problem if you > set SILENTLY_FAIL to False in the Haystack connection settings. In my case > I cannot even rebuild the index because it loudly crashes on this error.
> Is this a bug in Haystack? Does anyone know what the real cause of it is?
> Below is my traceback.
> $ bin/manage rebuild_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
> Removing all documents from your index because you said so. > Traceback (most recent call last): > File "bin/manage", line 42, in <module> > djangorecipe.manage.main('dje.settings') > File > "/Users/haitran/.buildout/eggs/djangorecipe-1.1.2-py2.6.egg/djangorecipe/ma nage.py", > line 19, in main > management.execute_manager(mod) > File > "/Users/haitran/.buildout/eggs/Django-1.4-py2.6.egg/django/core/management/ __init__.py", > line 459, in execute_manager > utility.execute() > File > "/Users/haitran/.buildout/eggs/Django-1.4-py2.6.egg/django/core/management/ __init__.py", > line 382, in execute > self.fetch_command(subcommand).run_from_argv(self.argv) > File > "/Users/haitran/.buildout/eggs/Django-1.4-py2.6.egg/django/core/management/ base.py", > line 196, in run_from_argv > self.execute(*args, **options.__dict__) > File > "/Users/haitran/.buildout/eggs/Django-1.4-py2.6.egg/django/core/management/ base.py", > line 232, in execute > output = self.handle(*args, **options) > File > "/Users/haitran/.buildout/eggs/django_haystack-2.0.0_beta-py2.6.egg/haystac k/management/commands/rebuild_index.py", > line 14, in handle > call_command('clear_index', **options) > File > "/Users/haitran/.buildout/eggs/Django-1.4-py2.6.egg/django/core/management/ __init__.py", > line 150, in call_command > return klass.execute(*args, **defaults) > File > "/Users/haitran/.buildout/eggs/Django-1.4-py2.6.egg/django/core/management/ base.py", > line 232, in execute > output = self.handle(*args, **options) > File > "/Users/haitran/.buildout/eggs/django_haystack-2.0.0_beta-py2.6.egg/haystac k/management/commands/clear_index.py", > line 41, in handle > backend.clear() > File > "/Users/haitran/.buildout/eggs/django_haystack-2.0.0_beta-py2.6.egg/haystac k/backends/elasticsearch_backend.py", > line 224, in clear > self.conn.refresh(indexes=[self.index_name]) > File "/Users/haitran/repos/dejacode/enterprise/pyelasticsearch.py", line > 412, in refresh > response = self._send_request('POST', path) > File "/Users/haitran/repos/dejacode/enterprise/pyelasticsearch.py", line > 213, in _send_request > raise ElasticSearchError("Non-OK status code returned (%d) containing > %r." % (resp.status_code, prepped_response.get('error', prepped_response))) > pyelasticsearch.ElasticSearchError: Non-OK status code returned (404) > containing u'IndexMissingException[[haystack] missing]'.
> On Friday, March 30, 2012 6:34:31 PM UTC-7, Stephen Burrows wrote:
>> Don't worry about those messages; they're annoying, but AFAICT they don't >> signal anything bad.
>> On Fri, Mar 30, 2012 at 4:47 AM, Eloi Cuevas <f15m...@gmail.com> wrote:
>>> To post to this group, send email to django-haystack@googlegroups.com. >>> To unsubscribe from this group, send email to >>> django-haystack+unsubscribe@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/django-haystack?hl=en.