Haystack: one searchIndex for multiple models

懵懂的女人 提交于 2019-12-08 01:16:30

问题


On the getting started page of Haystack, it describes the possibility of using one SearchIndex for multple models:

You generally create a unique SearchIndex for each type of Model you wish to index, though you can reuse the same SearchIndex between different models if you take care in doing so and your field names are very standardized.

However I haven't found any information regarding how to do so. The reasoning behind it is that a few Heroku search engine apps provide limited amount of indices, so I think it's a good idea to keep the number of indices slim. How should I do it?


回答1:


No of index will be one only unless you specify in setting.py .Multiple search_index.py files doesnot mean that multiple indexes.



来源:https://stackoverflow.com/questions/16170537/haystack-one-searchindex-for-multiple-models

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!