<?xml version="1.0" encoding="UTF-8" ?> <!--
This is an example of a simple "solr.xml" file for configuring one or
more Solr Cores, as well as allowing Cores to be added, removed, and
reloaded via HTTP requests. More information about options available in this configuration file,
and Solr Core administration can be found online:
http://wiki.apache.org/solr/CoreAdmin
--> <!--
All (relative) paths are relative to the Solr Home Directory persistent: Save changes made via the API to this file
//意思为是否将注册的实例的配置进行持久化动态注册一个实例就会到这里添加一个solrCore元素节点
sharedLib: path to a lib directory that will be shared across all cores
-->
<solr persistent="true">
<!-- by default, this is 50 @ WARN
<logging enabled="true">
<watcher size="100" threshold="INFO" />
</logging>
--> <!--
adminPath: RequestHandler path to manage cores.
If 'null' (or absent), cores will not be manageable via request handler
defaultCoreName: 可选属性,用于在solr客户端界面显示选中。//如果这里没有写defaultCoreName的话就会显示所有的core实例子在开始的管理界面 在标签cores中,所有位于defaultCoreName后面的属性都是在SolrCloud模式时用到。
关于SolrCloud的更多信息:http://wiki.apache.org/solr/SolrCloud
-->
<cores adminPath="/admin/cores" defaultCoreName="collection1">
<core name="collection1" instanceDir="." />
</cores>
</solr>
该文件位于索引库的根目录下,用于定义索引库核心。