gpt4 book ai didi

django - Haystack + Whoosh IndexError:索引是在具有不同数据大小的体系结构上创建的

转载 作者:行者123 更新时间:2023-12-02 04:14:22 25 4
gpt4 key购买 nike

通过./manage.py rebuild_index重建索引时,出现以下错误:

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/management/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

最佳答案

您可能已经从whoosh 1.0.0降级到0.3.18,但是在HAYSTACK_WHOOSH_PATH定义的路径上已经创建了一些错误的索引文件。只需将该目录设为空,然后重试。

关于django - Haystack + Whoosh IndexError:索引是在具有不同数据大小的体系结构上创建的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3597177/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com