怀着十分悲痛的心情写下这篇博客...
想要添加一个搜索功能,按照网上的教程使用haystack+whoosh+jieba
一步一步到了最后创建索引的部分,这里有两个方法,rebuild_index 和 update_index。
第一次用rebuild_index,报错:
TypeError: Unknown option(s) for clear_index command: batchsize, workers. Valid options are: commit, help, interactive, no_color, nocommit, noinput, pythonpath, settings, skip_checks, stderr, stdout, traceback, using, verbosity, version.
百度谷歌后并没有发现什么解决方案,但是也有人报这个错,并且通过换成update_index命令解决了。
紧张的按下update_index...
AttributeError: 'BlogIndex' object has no attribute 'fields'
(BlogIndex是我的索引类名)
嗯。。。继续查
然而这回是真的卵都没有查到。。。
只好去haystack的官网,按照官网的get_start 教程又检查了一遍代码...
还是没有用,并没有解决问题
我尝试去看这个错误的跟踪信息,然而Attribut