【发布时间】:2021-08-23 15:14:40
【问题描述】:
我已按照Tutorial 中给出的所有步骤进行操作,但我的项目的搜索功能无法正常工作。而 django-machina 给出的示例项目在搜索中运行良好。所以有人可以告诉我缺少的东西是什么。我还重建并更新了索引。但我的搜索仍然没有给出任何结果。它总是 0 结果没有错误。
当我运行重建索引命令时,我收到以下错误
python3 manage.py rebuild_index
/usr/local/lib/python3.8/site-packages/jose/backends/cryptography_backend.py:18: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
from cryptography.utils import int_from_bytes, int_to_bytes
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.
/usr/local/lib/python3.8/site-packages/haystack/backends/simple_backend.py:31 UserWarning: clear is not implemented in this backend
All documents removed.
Indexing 13 Posts
/usr/local/lib/python3.8/site-packages/haystack/backends/simple_backend.py:25 UserWarning: update is not implemented in this backend
【问题讨论】:
-
您能提供您的代码吗?没有看到你的实现,很难指出哪里出了问题。
标签: python-3.x django django-haystack