作者:工农大路店NOKIA客户服务中心 | 来源:互联网 | 2023-05-19 11:41
目录:1.Solr:solr-4.4.02.jdk:jdk-6u13-linux-i586(由于solr采用4.4版本,所以jdk最低版本要求1.6)3.tomcat:apache-tomc
目录:
1.
Solr:solr-4.4.0
2.
jdk:jdk-6u13-linux-i586 (由于solr采用4.4版本,所以jdk最低版本要求1.6)
3.
tomcat:apache-tomcat-7.0.42.tar
4. 中文分词: IK Analyzer 2012FF_hf1
5. Slave环境通过复制Master来搭建
安装jdk及tomcat过程
其中需要配置tomcat最大链接数,可参考:
cOnnectionTimeout="20000"
redirectPort="8443" maxThreads="1000" minSpareThreads="100" maxSpareThreads="200" acceptCount="1000" URIEncoding="UTF-8"/>
minProcessors:最小空闲连接线程数,用于提高系统处理性能,默认值为10
maxProcessors:最大连接线程数,即:并发处理的最大请求数,默认值为75
acceptCount:允许的最大连接数,应大于等于maxProcessors,默认值为100
enableLookups:是否反查域名,取值为:true或false。为了提高处理能力,应设置为false
connectionTimeout: 网络连接超时,单位:毫秒。设置为0表示永不超时,这样设置有隐患的。通常可设置为30000毫秒。
其中和最大连接数相关的参数为maxProcessors和acceptCount。如果要加大并发连接数,应同时加大这两个参数。
web server允许的最大连接数还受制于操作系统的内核参数设置,通常Windows是2000个左右,Linux是1000个左右。
安装solr
--------------------------------
第一步:测试环境
服务器1(Master)
操作系统: Centos 6.2
IP: 192.168.17.128:9080
JDK: Sun JDK 1.6
Web服务器: Apache Tomcat6
Solr版本: Solr4.4.0
服务器2(Slave)
操作系统: Centos 6.2
IP: 192.168.17.128:9081
JDK: Sun JDK 1.6
Web服务器: Apache Tomcat6
Solr版本: Solr4.4.0
--------------------------------
1.
拷贝solr.war到tomcat目录
#cp -rf solr-4.4.0/example/webapps/solr.war /usr/local/apache-tomcat-7.0.42/webapps/solr.war
2.
创建solr工作主目录
[root@demoserver ~]# mkdir -p /home/solr/master/solr4server
[root@demoserver ~]# mkdir -p /home/solr/master/solr4home
[root@demoserver ~]# mkdir -p /home/solr/slave/solr4server
[root@demoserver ~]# mkdir -p /home/solr/slave/solr4home
[root@demoserver solr]# pwd
/home/solr
[root@demoserver solr]# ll
total 16
drwxr-xr-x. 2 root root 4096 Jan 27 20:14 solr4home
drwxr-xr-x. 2 root root 4096 Jan 27 20:15 solr4home
drwxr-xr-x. 2 root root 4096 Jan 27 20:14 solr4server
drwxr-xr-x. 2 root root 4096 Jan 27 20:15 solr4server
[root@demoserver solr]# cp -a . /home/solr/master/solr4home/
[root@demoserver solr]# cp -a . /home/solr/slave/solr4home/
[root@demoserver local]# cd tomcat/
[root@demoserver tomcat]# ll
total 88
drwxr-xr-x. 2 root root 4096 Jan 27 01:35 bin
drwxr-xr-x. 3 root root 4096 Jan 27 04:51 conf
drwxr-xr-x. 2 root root 4096 Jan 27 01:35 lib
-rw-r--r--. 1 root root 37951 Jan 27 01:35 LICENSE
drwxr-xr-x. 2 root root 4096 Jan 27 04:51 logs
-rw-r--r--. 1 root root 556 Jan 27 01:35 NOTICE
-rw-r--r--. 1 root root 7317 Jan 27 01:35 RELEASE-NOTES
-rw-r--r--. 1 root root 6368 Jan 27 01:35 RUNNING.txt
drwxr-xr-x. 2 root root 4096 Jan 27 01:35 temp
drwxr-xr-x. 7 root root 4096 Jan 27 01:35 webapps
drwxr-xr-x. 3 root root 4096 Jan 27 04:51 work
[root@demoserver tomcat]# cp -R . /home/solr/master/solr4server/
3.
配置solrhome
[root@demoserver bin]# vi /home/solr/master/solr4server_master/bin/catalina.sh
# -----------------------------------------------------------------------------
# configure at 2014/2/14 at in catalina.sh
export JAVA_HOME=/usr/local/jdk
export SOLR_HOME=/home/solr/master
export JAVA_OPTS="$JAVA_OPTS -server -Xmx1024m -Xms512m -Dsolr.solr.home=$SOLR_HOME/solr4home/"
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=$JAVA_HOME/lib
export CATALINA_HOME=$SOLR_HOME/solr4server
export CATALINA_BASE=$SOLR_HOME/solr4server
3. 拷贝solr启动的依赖文件
* 复制example/lib/ext目录中的jar包到项目的classpath下,可以将这些jar包放到%TOMCAT_HOME%/lib下,
也可以将它们放到项目的lib下(在我的电脑上是/webapps/solr/WEB-INF/lib);
* example/resources/log4j.properties也拷到classpath(我在/solr_server/webapps/solr/目录下新建了一个classes目录,
放log4j.properties放了进去);
4. 配置好后可以直接启动tomcat
[root@demoserver bin]# pwd
/home/solr/master/solr4server/bin
[root@demoserver bin]# ./startup.sh
5.
如果第三步没有执行这时会无法访问,solr4.4.0需要拷贝一些jar
# cp solr-4.4.0/example/lib/ext/* /usr/local/apache-tomcat-7.0.42/webapps/solr/WEB-INF/lib/
# cp solr-4.4.0/example/resources/log4j.properties /usr/local/apache-tomcat-7.0.42/lib/
6.
重启tomcat,访问URL http://10.248.12.135:9080/solr
http://blog.csdn.net/natureice/article/details/9109351export JAVA_HOME=/usr/java/jdk1.6.0_38
export SOLR_HOME=/usr/local/solr/solr1
export JAVA_OPTS="$JAVA_OPTS -server -Xmx1024m -Xms512m -Dsolr.solr.home=$SOLR_HOME/solrhome/"
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=$JAVA_HOME/lib
export CATALINA_HOME=$SOLR_HOME/tomcat
export CATALINA_BASE=$SOLR_HOME/tomcat
7.查看启动过日志
错误信息 :
INFO - 2014-02-16 11:50:04.751; org.apache.solr.handler.component.QueryElevationComponent; Loading QueryElevation from: /home/solr/master/solr4home/collection1/conf/elevate.xml
Feb 16, 2014 11:50:10 AM org.apache.catalina.connector.Connector pause
SEVERE: Protocol handler pause failed
java.net.UnknownHostException: demoserver: demoserver
at java.net.InetAddress.getLocalHost(InetAddress.java:1402)
at org.apache.jk.common.ChannelSocket.unLockSocket(ChannelSocket.java:485)
at org.apache.jk.common.ChannelSocket.pause(ChannelSocket.java:284)
at org.apache.jk.server.JkMain.pause(JkMain.java:683)
at org.apache.jk.server.JkCoyoteHandler.pause(JkCoyoteHandler.java:153)
at org.apache.catalina.connector.Connector.pause(Connector.java:1073)
at org.apache.catalina.core.StandardService.stop(StandardService.java:563)
at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:633)
at org.apache.catalina.startup.Catalina.start(Catalina.java:608)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Feb 16, 2014 11:50:11 AM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
解决方案:
That is related with
hostname
and
/etc/hosts
If /etc/hosts doesn't containt the definition of the hostname it fails.
Just add your hostname to /etc/hosts for example
if your hostname is work add or modified the following line:
127.0.0.1 work localhost
通过以上配置后ok。
访问solr服务
http://192.168.17.128:9080/solr/#/
中文分词IK Analyzer 2012FF_hf1配置与安装
1. 下载IK+Analyzer+2012FF_hf1.zip分词的安装包
用到其中三个文件:
IKAnalyzer2012FF_u1.jar,放到$CATALINA_HOME/webapps/solr/WEB-INF/lib/目录下
IKAnalyzer.cfg.xml,stopword.dic,放到$CATALINA_HOME/webapps/solr/WEB-INF/classes/目录下,
如果classes目录没有,可以手动创建一个。
2.将分词配置到solr的配置文件中
#vi /usr/local/solrhome/collection1/conf/schema.xml,添加如下内容:
3.将需要建立索引的域添加到schema.xml中
4.最后重启tomcat,查看分词效果
Slave环境通过复制Master来搭建
1. 复制Master中的服务和solrhome
[root@demoserver solr]# ll
total 8
drwxr-xr-x. 4 root root 4096 Jan 29 14:17 master
drwxr-xr-x. 2 root root 4096 Feb 16 15:07 slave
[root@demoserver solr]# cp -R master/* slave/
[root@demoserver solr]# pwd
/home/solr
[root@demoserver solr]# cd slave/
[root@demoserver slave]# ll
total 8
drwxr-xr-x. 4 root root 4096 Feb 16 15:08 solr4home
drwxr-xr-x. 9 root root 4096 Feb 16 15:08 solr4server
2. 修改solr4server中的启动参数
[root@demoserver bin]# vi catalina.sh
# configure solr slave 2014/2/14 at in catalina.sh
export JAVA_HOME=/usr/local/jdk
export SOLR_HOME=/home/solr/slave
export JAVA_OPTS="$JAVA_OPTS -server -Xmx1024m -Xms512m -Dsolr.solr.home=$SOLR_HOME/solr4home/"
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=$JAVA_HOME/lib
export CATALINA_HOME=$SOLR_HOME/solr4server
export CATALINA_BASE=$SOLR_HOME/solr4server
3. 修改服务器的端口
[root@demoserver conf]# pwd
/home/solr/slave/solr4server/conf
编辑 server.xml ,修改port为从原来8080到9081
cOnnectionTimeout="20000"
redirectPort="8443"
maxThreads="1000" minSpareThreads="100" maxSpareThreads="200" acceptCount="1000" URIEncoding="UTF-8"/>
编辑 server.xml ,修改port为从8005到9005
4. 主从复制搭建过程
第一步:修改主:solrconfig.xml文件(目前设置的同步周期为一分钟,具体可视生产环境的具体环境而定。)
在Master的配置文件中添加一个RequestHandler,RequestHandler是复制在Master端的主要手段,Slave会定期向这个RequestHandler发送请求,并完成索引文件的同步;
Master负责写数据(Write_A)到从服务器中;
replicateAfter说明什么时候进行复制,取值可以是startup, commit, optimize分别是创建索引、提交索引、优化索引之后。每当这些动作执行结束后,Slave就可以从Master上进行复制了;
Write_A 作为Master,solrconfig.xml 找到
修改后内容:
commit
startup
solrconfig_slave.xml:solrconfig.xml,schema.xml,stopwords.txt,elevate.xml
admin
123456
第二步:从solr 文件
Slave负责读数据(Read_B)到从服务器内容。
属性值是一个url,指向了Master服务器上的提供复制功能的requestHandler,
master_host:master服务器的IP或主机名
port:master服务器上部署solr应用的tomcat端口
solr:solr的web应用名称
corename: solr中的core,关于core的概念请参考相关文档。由于本案例中不涉及多个core,所以此处的url中可以去掉这项,也不对core进行过多的说明。
replaction: Master上提供复制的requestHandler名称,也就是requestHandler的name属性的取值。
00:00:20是Slave定期检测Master的时间,格式是HH:mm:ss。这里配置的时间是20秒,因此Slave每个20秒会主动请求一次Master服务器,获得Master服务器上索引文件的状态,比如最后修改时间,文件尺寸等,如果与本机的索引文件不同就进行复制,实现同步。
Read_B 作为Slave,solrconfig.xml 找到
http://192.168.17.128:9080/solr/replication
00:00:60
internal
5000
10000
admin
123456
关于主从复制搭建过程请继续关注后续课程。
第三步:索引复制后通过日志分析
INFO - 2014-02-16 15:41:00.014; org.apache.solr.handler.SnapPuller; Master's generation: 2
INFO - 2014-02-16 15:41:00.016; org.apache.solr.handler.SnapPuller; Slave's generation: 1
INFO - 2014-02-16 15:41:00.016; org.apache.solr.handler.SnapPuller; Starting replication process
INFO - 2014-02-16 15:41:00.061; org.apache.solr.handler.SnapPuller; Number of files in latest index in master: 21
INFO - 2014-02-16 15:41:00.063; org.apache.solr.core.CachingDirectoryFactory; return new directory for /home/solr/slave/solr4home/collection1/data/index.20140216154100062
INFO - 2014-02-16 15:41:00.064; org.apache.solr.handler.SnapPuller; Starting download to NRTCachingDirectory(org.apache.lucene.store.MMapDirectory@/home/solr/slave/solr4home/collection1/data/index.20140216154100062 lockFactory=org.apache.lucene.store.NativeFSLockFactory@4df93ace; maxCacheMB=48.0 maxMergeSizeMB=4.0) fullCopy=false
INFO - 2014-02-16 15:41:07.641; org.apache.solr.handler.SnapPuller; Total time taken for download : 7 secs
INFO - 2014-02-16 15:41:07.665; org.apache.solr.update.DefaultSolrCoreState; Closing IndexWriter...
INFO - 2014-02-16 15:41:07.667; org.apache.solr.update.DefaultSolrCoreState; Waiting until IndexWriter is unused... core=collection1
INFO - 2014-02-16 15:41:07.669; org.apache.solr.update.DefaultSolrCoreState; Creating new IndexWriter...
INFO - 2014-02-16 15:41:07.789; org.apache.solr.core.SolrDeletionPolicy; SolrDeletionPolicy.onInit: commits: num=2
commit{dir=NRTCachingDirectory(org.apache.lucene.store.MMapDirectory@/home/solr/slave/solr4home/collection1/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@3600e312; maxCacheMB=48.0 maxMergeSizeMB=4.0),segFN=segments_1,generation=1}
commit{dir=NRTCachingDirectory(org.apache.lucene.store.MMapDirectory@/home/solr/slave/solr4home/collection1/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@3600e312; maxCacheMB=48.0 maxMergeSizeMB=4.0),segFN=segments_2,generation=2}
INFO - 2014-02-16 15:41:07.796; org.apache.solr.core.SolrDeletionPolicy; newest commit generation = 2
INFO - 2014-02-16 15:41:07.799; org.apache.solr.update.DefaultSolrCoreState; New IndexWriter is ready to be used.
INFO - 2014-02-16 15:41:07.854; org.apache.solr.search.SolrIndexSearcher; Opening Searcher@4ad61301 main
INFO - 2014-02-16 15:41:07.860; org.apache.solr.core.QuerySenderListener; QuerySenderListener sending requests to Searcher@4ad61301 main{StandardDirectoryReader(segments_2:5:nrt _0(4.4):C1 _1(4.4):C1)}
INFO - 2014-02-16 15:41:07.860; org.apache.solr.core.QuerySenderListener; QuerySenderListener done.
INFO - 2014-02-16 15:41:07.868; org.apache.solr.core.SolrCore; [collection1] Registered new searcher Searcher@4ad61301 main{StandardDirectoryReader(segments_2:5:nrt _0(4.4):C1 _1(4.4):C1)}
INFO - 2014-02-16 15:41:07.869; org.apache.solr.core.CachingDirectoryFactory; looking to close /home/solr/slave/solr4home/collection1/data/index.20140216154100062 [CachedDir<>]
INFO - 2014-02-16 15:41:07.869; org.apache.solr.core.CachingDirectoryFactory; Closing directory: /home/solr/slave/solr4home/collection1/data/index.20140216154100062
INFO - 2014-02-16 15:41:07.870; org.apache.solr.core.CachingDirectoryFactory; Removing directory before core close: /home/solr/slave/solr4home/collection1/data/index.20140216154100062
INFO - 2014-02-16 15:42:00.011; org.apache.solr.handler.SnapPuller; Slave in sync with master.
INFO - 2014-02-16 15:43:00.010; org.apache.solr.handler.SnapPuller; Slave in sync with master.
INFO - 2014-02-16 15:44:00.007; org.apache.solr.handler.SnapPuller; Slave in sync with master.
INFO - 2014-02-16 15:45:00.008; org.apache.solr.handler.SnapPuller; Slave in sync with master.
INFO - 2014-02-16 15:46:00.010; org.apache.solr.handler.SnapPuller; Slave in sync with master.
INFO - 2014-02-16 15:47:00.010; org.apache.solr.handler.SnapPuller; Master's generation: 3
INFO - 2014-02-16 15:47:00.012; org.apache.solr.handler.SnapPuller; Slave's generation: 2
INFO - 2014-02-16 15:47:00.013; org.apache.solr.handler.SnapPuller; Starting replication process
INFO - 2014-02-16 15:47:00.037; org.apache.solr.handler.SnapPuller; Number of files in latest index in master: 31
INFO - 2014-02-16 15:47:00.039; org.apache.solr.core.CachingDirectoryFactory; return new directory for /home/solr/slave/solr4home/collection1/data/index.20140216154700039
INFO - 2014-02-16 15:47:00.057; org.apache.solr.handler.SnapPuller; Starting download to NRTCachingDirectory(org.apache.lucene.store.MMapDirectory@/home/solr/slave/solr4home/collection1/data/index.20140216154700039 lockFactory=org.apache.lucene.store.NativeFSLockFactory@6b1ce2ad; maxCacheMB=48.0 maxMergeSizeMB=4.0) fullCopy=false
INFO - 2014-02-16 15:47:00.106; org.apache.solr.handler.SnapPuller; Skipping download for _1_Lucene41_0.doc because it already exists
INFO - 2014-02-16 15:47:00.125; org.apache.solr.handler.SnapPuller; Skipping download for _0_Lucene41_0.pos because it already exists
INFO - 2014-02-16 15:47:00.138; org.apache.solr.handler.SnapPuller; Skipping download for _1.fnm because it already exists
INFO - 2014-02-16 15:47:00.139; org.apache.solr.handler.SnapPuller; Skipping download for _0.nvd because it already exists
INFO - 2014-02-16 15:47:00.139; org.apache.solr.handler.SnapPuller; Skipping download for _0.si because it already exists
INFO - 2014-02-16 15:47:00.139; org.apache.solr.handler.SnapPuller; Skipping download for _0_Lucene41_0.tim because it already exists
INFO - 2014-02-16 15:47:00.142; org.apache.solr.handler.SnapPuller; Skipping download for _0_Lucene41_0.tip because it already exists
INFO - 2014-02-16 15:47:00.143; org.apache.solr.handler.SnapPuller; Skipping download for _1.nvm because it already exists
INFO - 2014-02-16 15:47:00.143; org.apache.solr.handler.SnapPuller; Skipping download for _0.fnm because it already exists
INFO - 2014-02-16 15:47:00.143; org.apache.solr.handler.SnapPuller; Skipping download for _1_Lucene41_0.tim because it already exists
INFO - 2014-02-16 15:47:00.144; org.apache.solr.handler.SnapPuller; Skipping download for _1.nvd because it already exists
INFO - 2014-02-16 15:47:00.163; org.apache.solr.handler.SnapPuller; Skipping download for _1_Lucene41_0.tip because it already exists
INFO - 2014-02-16 15:47:00.179; org.apache.solr.handler.SnapPuller; Skipping download for _0.nvm because it already exists
INFO - 2014-02-16 15:47:00.201; org.apache.solr.handler.SnapPuller; Skipping download for _1.fdx because it already exists
INFO - 2014-02-16 15:47:00.202; org.apache.solr.handler.SnapPuller; Skipping download for _1_Lucene41_0.pos because it already exists
INFO - 2014-02-16 15:47:00.220; org.apache.solr.handler.SnapPuller; Skipping download for _1.fdt because it already exists
INFO - 2014-02-16 15:47:00.220; org.apache.solr.handler.SnapPuller; Skipping download for _0_Lucene41_0.doc because it already exists
INFO - 2014-02-16 15:47:00.220; org.apache.solr.handler.SnapPuller; Skipping download for _1.si because it already exists
INFO - 2014-02-16 15:47:00.242; org.apache.solr.handler.SnapPuller; Skipping download for _0.fdx because it already exists
INFO - 2014-02-16 15:47:00.259; org.apache.solr.handler.SnapPuller; Skipping download for _0.fdt because it already exists
INFO - 2014-02-16 15:47:00.260; org.apache.solr.handler.SnapPuller; Total time taken for download : 0 secs
INFO - 2014-02-16 15:47:00.261; org.apache.solr.upda
te.DefaultSolrCoreState; Closing IndexWriter...
INFO - 2014-02-16 15:47:00.261; org.apache.solr.update.DefaultSolrCoreState;
Waiting until IndexWriter is unused... core=collection1
INFO - 2014-02-16 15:47:00.262; org.apache.solr.update.DefaultSolrCoreState; R
ollback old IndexWriter... core=collection1
INFO - 2014-02-16 15:47:00.273; org.apache.solr.update.DefaultSolrCoreState;
Creating new IndexWriter...
INFO - 2014-02-16 15:47:00.320; org.apache.solr.core.SolrDeletionPolicy;
SolrDeletionPolicy.onInit: commits: num=2
commit{dir=NRTCachingDirectory(org.apache.lucene.store.MMapDirectory@/home/solr/slave/solr4home/collection1/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@3600e312; maxCacheMB=48.0 maxMergeSizeMB=4.0),segFN=segments_2,generation=2}
commit{dir=NRTCachingDirectory(org.apache.lucene.store.MMapDirectory@/home/solr/slave/solr4home/collection1/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@3600e312; maxCacheMB=48.0 maxMergeSizeMB=4.0),segFN=segments_3,generation=3}
INFO - 2014-02-16 15:47:00.321; org.apache.solr.core.SolrDeletionPolicy; newest commit generation = 3
INFO - 2014-02-16 15:47:00.324; org.apache.solr.update.
DefaultSolrCoreState; New IndexWriter is ready to be used.
INFO - 2014-02-16 15:47:00.349; org.apache.solr.search.SolrIndexSearcher; Opening Searcher@123e1d25 main
INFO - 2014-02-16 15:47:00.350; org.apache.solr.core.QuerySenderListener; QuerySenderListener sending requests to Searcher@123e1d25 main{StandardDirectoryReader(segments_3:7:nrt _0(4.4):C1 _1(4.4):C1 _2(4.4):C1)}
INFO - 2014-02-16 15:47:00.350; org.apache.solr.core.QuerySenderListener; QuerySenderListener done.
INFO - 2014-02-16 15:47:00.369; org.apache.solr.core.SolrCore; [collection1] Registered new searcher Searcher@123e1d25 main{StandardDirectoryReader(segments_3:7:nrt _0(4.4):C1 _1(4.4):C1 _2(4.4):C1)}
INFO - 2014-02-16 15:47:00.374; org.apache.solr.core.CachingDirectoryFactory; looking to close /home/solr/slave/solr4home/collection1/data/index.20140216154700039 [CachedDir<>]
INFO - 2014-02-16 15:47:00.375; org.apache.solr.core.CachingDirectoryFactory; Closing directory: /home/solr/slave/solr4home/collection1/data/index.20140216154700039
INFO - 2014-02-16 15:47:00.375; org.apache.solr.core.CachingDirectoryFactory; Removing directory before core close: /home/solr/slave/solr4home/collection1/data/index.20140216154700039
INFO - 2014-02-16 15:48:00.010; org.apache.solr.handler.SnapPuller;
Slave in sync with master.
首先,Slave服务器每个一分钟向Master的replication发送一个请求,Master执行replication请求,Master主要通过sync
方式把索引的快照同步给Slave服务器,