yadianna 发表于 2016-12-15 06:25:17

solr多核心配置

  1.将solr-4.10.3\example\multicore下的所有文件copy到solr home。如之前配置的e:solr
  2.修改solr.xml

<cores adminPath="/admin/cores"host="${host:}" defaultCoreName="core0" hostPort="${port:8090}" hostContext="${hostContext:solr}">
<core name="core0" instanceDir="core0" />
<core name="core1" instanceDir="core1" />
<shardHandlerFactory name="shardHandlerFactory" class="HttpShardHandlerFactory">
<str name="urlScheme">${urlScheme:}</str>
</shardHandlerFactory>
</cores>
   AdminPath是指url路径
Host是指主机名
defaultCoreName是指默认使用的核心(不配置也完全可以)
hostPort是指访问的端口(跟tomcat的端口保持一致)
hostContext是指主机的上下文,也就是webapps中solr的项目名
页: [1]
查看完整版本: solr多核心配置