Multiple Cores in Django Haystack using Solr Backend

家住魔仙堡 提交于 2019-12-06 07:46:17
  <cores adminPath="/admin/cores">
    <core name="core0" instanceDir="core0" />
    <core name="core1" instanceDir="core1" />
  </cores>

So, you would search core0 by

http://127.0.0.1:8983/solr/core0/select/?q=*

If you had a core "mysite"

http://127.0.0.1:8983/solr/mysite/select/?q=*

Whereas if it were not multi-core

http://127.0.0.1:8983/solr/select/?q=*

assuming you named your solr app as "solr".


Do refer the multi-core docs in full. You can dynamically load/unload cores and even swap a live core with another without dropping requests.

in our project, we have 3 cores, called "cars" "homes" "jobs"

i settings i have:

CORE_HOUSE = http://localhost:8080/solr/homes/
CORE_HOUSE = http://localhost:8080/solr/cars/
CORE_HOUSE = http://localhost:8080/solr/jobs/

whenever you need them, you refer to the settings variable (where localhost:8080 is your solr installation address)

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