python – Django-Haystack / Whoosh – 重建索引错误
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了python – Django-Haystack / Whoosh – 重建索引错误,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含3498字,纯文字阅读大概需要5分钟。
内容图文
![python – Django-Haystack / Whoosh – 重建索引错误](/upload/InfoBanner/zyjiaocheng/742/f924098f133a4251a4dfe5c78edc1211.jpg)
Python 2.5,Django 1.2.1,最近的haystack,最近的飞快移动
这是我第一次深入研究Django-Haystack.我正在关注Haystack的“入门”指南,一切似乎都很顺利,直到我去构建索引.
所以,运行“manage.py rebuild_index”会向我发回信息:
Traceback (most recent call last):
File "/Users/steenb/Documents/Aptana Studio Workspace/bucksac/buckshr/manage.py", line 11, in <module>
execute_manager(settings)
File "/Library/Python/2.5/site-packages/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
File "/Library/Python/2.5/site-packages/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Library/Python/2.5/site-packages/django/core/management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "/Library/Python/2.5/site-packages/django/core/management/base.py", line 218, in execute
output = self.handle(*args, **options)
File "/Library/Python/2.5/site-packages/haystack/management/commands/rebuild_index.py", line 13, in handle
call_command('clear_index', **options)
File "/Library/Python/2.5/site-packages/django/core/management/__init__.py", line 166, in call_command
return klass.execute(*args, **defaults)
File "/Library/Python/2.5/site-packages/django/core/management/base.py", line 218, in execute
output = self.handle(*args, **options)
File "/Library/Python/2.5/site-packages/haystack/management/commands/clear_index.py", line 38, in handle
sb.clear()
File "/Library/Python/2.5/site-packages/haystack/backends/whoosh_backend.py", line 212, in clear
self.index.commit()
AttributeError: 'FileIndex' object has no attribute 'commit'
不知道哪里开始这个…有没有人遇到过这个?
有关解决方案的任何想法?
更新:
用python 2.6试过这个,得到了同样的错误.是否有一些我没有做过的飞快移动配置?
更新:
使用philippbosch的以下建议后,第一个错误不再出现了,但现在我得到了这个:
Traceback (most recent call last):
File "/Users/steenb/Documents/Aptana Studio Workspace/bucksac/buckshr/manage.py", line 11, in <module>
execute_manager(settings)
File "/Library/Python/2.5/site-packages/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
File "/Library/Python/2.5/site-packages/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Library/Python/2.5/site-packages/django/core/management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "/Library/Python/2.5/site-packages/django/core/management/base.py", line 218, in execute
output = self.handle(*args, **options)
File "/Library/Python/2.5/site-packages/haystack/management/commands/update_index.py", line 69, in handle
return super(Command, self).handle(*apps, **options)
File "/Library/Python/2.5/site-packages/django/core/management/base.py", line 282, in handle
app_output = self.handle_app(app, **options)
File "/Library/Python/2.5/site-packages/haystack/management/commands/update_index.py", line 123, in handle_app
index.backend.update(index, small_cache_qs[start:end])
File "/Library/Python/2.5/site-packages/haystack/backends/whoosh_backend.py", line 163, in update
writer = AsyncWriter(self.index.writer, postlimit=self.post_limit)
TypeError: __init__() got an unexpected keyword argument 'postlimit'
我想知道我是否正在使用一个不相容的飞快移动版……我抓住了最新的1.0.0b2 … http://pypi.python.org/pypi/Whoosh/
更新:
原来这是一个版本问题.目前,Haystack与呐喊0.3.18相关联
解决方法:
我刚才遇到了同样的问题.您是否尝试过»update_index«而不是»rebuild_index«?这似乎对我有用……
内容总结
以上是互联网集市为您收集整理的python – Django-Haystack / Whoosh – 重建索引错误全部内容,希望文章能够帮你解决python – Django-Haystack / Whoosh – 重建索引错误所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。