开发者

Haystack + Whoosh IndexError: Index was created on an architecture with different data sizes

When rebuilding my indices via ./manage.py rebuild_index I get this error:

Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_manager(settings)
  File "/Library/Python/2.6/site-packages/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/Library/Python/2.6/site-packages/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Library/Python/2.6/site-packages/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/Library/Python/2.6/site-packages/django/core/manageme开发者_JS百科nt/base.py", line 218, in execute
    output = self.handle(*args, **options)
  File "/Library/Python/2.6/site-packages/haystack/management/commands/rebuild_index.py", line 13, in handle
    call_command('clear_index', **options)
  File "/Library/Python/2.6/site-packages/django/core/management/__init__.py", line 166, in call_command
    return klass.execute(*args, **defaults)
  File "/Library/Python/2.6/site-packages/django/core/management/base.py", line 218, in execute
    output = self.handle(*args, **options)
  File "/Library/Python/2.6/site-packages/haystack/management/commands/clear_index.py", line 38, in handle
    sb.clear()
  File "/Library/Python/2.6/site-packages/haystack/backends/whoosh_backend.py", line 197, in clear
    self.setup()
  File "/Library/Python/2.6/site-packages/haystack/backends/whoosh_backend.py", line 105, in setup
    self.index = self.storage.open_index(schema=self.schema)
  File "/Library/Python/2.6/site-packages/Whoosh-0.3.18-py2.6.egg/whoosh/filedb/filestore.py", line 48, in open_index
  File "/Library/Python/2.6/site-packages/Whoosh-0.3.18-py2.6.egg/whoosh/filedb/fileindex.py", line 94, in __init__
  File "/Library/Python/2.6/site-packages/Whoosh-0.3.18-py2.6.egg/whoosh/filedb/fileindex.py", line 173, in _read
IndexError: Index was created on an architecture with different data sizes


You have probably downgraded from whoosh 1.0.0 to 0.3.18, but there are some buggy index files already created at the path you defined by HAYSTACK_WHOOSH_PATH. Just make that directory empty and try again.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜