2

我在一个有几个应用程序的项目上使用 django-haystack。所以我在一个应用程序中有一个 search_indexes.py 和另一个在同一个项目中的 search_indexes.py 。

project
 ├── app
 │    ├── search_indexes.py
 │ 

   ├── app2 ├── search_indexes.py

我的两个索引相对容易,我也有同样的问题:

Haystack 多个索引 - 即使存在不同的 search_indexes,索引也相同

在弹性搜索中,两者都被合并了,我无法在我的结果中区分它们,而且我觉得它是两者之一,因为两者都在 elsticsearch 中被很好地索引,我不知道如何。当我制作 build_index 时:

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.
All documents removed.
Indexing 25 custom forms  
Indexing 12 articles

一切都很好索引,我喜欢他在索引中寻找并且可以区分。

谢谢

4

0 回答 0