如何设置 solr 8.11 复制从站?
我尝试设置 solr 主/从复制。但我有一些问题需要了解如何设置从属 solr。在每个文档或“如何做”中,仅描述了从属设备的不同 solrconfig.xml,但没有描述我应该如何设置它们。
我应该在从属设备上也创建一个核心吗?因为当我这样做时,奴隶solr并没有意识到他应该是一个奴隶。当我在slave上调用 /replication?command=details
时,输出是
{
"responseHeader":{
"status":0,
"QTime":1},
"status":"OK",
"details":{
"indexSize":"69 bytes",
"indexPath":"/var/solr/data/vdiParts/data/index/",
"commits":[[
"indexVersion",0,
"generation",1,
"filelist",["segments_1"]]],
"isMaster":"true",
"isSlave":"false",
"indexVersion":0,
"generation":1,
"master":{
"replicateAfter":["commit"],
"replicationEnabled":"true"}}}
所以他认为他是一个master。在从属 solrconfig.xml 中,我创建了正确的 requestHandler
<requestHandler name="/replication" class="solr.ReplicationHandler">
<lst name="follower">
<str name="leaderUrl">http://[host]:8983/solr/[core]/replication</str>
<str name="pollInterval">00:00:20</str>
<str name="httpConnTimeout">5000</str>
<str name="httpReadTimeout">10000</str>
</lst>
</requestHandler>
Thx!
I try to setup a solr master/slave replication. But I've some issues to understand how I setup the slave solr. In each documentation or "How to do" there are only described the different solrconfig.xml for slave but not how I should setup them.
Should I create on the slave also a core too? Because when I do it, the slave solr didn't recognized that he should be a slave. When I call /replication?command=details
on slave, the output are
{
"responseHeader":{
"status":0,
"QTime":1},
"status":"OK",
"details":{
"indexSize":"69 bytes",
"indexPath":"/var/solr/data/vdiParts/data/index/",
"commits":[[
"indexVersion",0,
"generation",1,
"filelist",["segments_1"]]],
"isMaster":"true",
"isSlave":"false",
"indexVersion":0,
"generation":1,
"master":{
"replicateAfter":["commit"],
"replicationEnabled":"true"}}}
So he thinks he is a master. In slave solrconfig.xml I create the correct requestHandler
<requestHandler name="/replication" class="solr.ReplicationHandler">
<lst name="follower">
<str name="leaderUrl">http://[host]:8983/solr/[core]/replication</str>
<str name="pollInterval">00:00:20</str>
<str name="httpConnTimeout">5000</str>
<str name="httpReadTimeout">10000</str>
</lst>
</requestHandler>
Thx!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,您需要创建第二个核心,完成后更新其 solrconfig.xml 以指示主 Solr 在哪里。
主核心中的
solrconfig.xml
将有一个如下所示的部分:而从属核心中的
solrconfig.xml
将有一个看起来或多或少像这样的部分:更多详细信息https://github.com/hectorcorrea/solr-for-newbies/blob/code4lib_2018/tutorial.md#solr-replication
Yes, you need to create the second core and after you have done that, update its
solrconfig.xml
to indicate that where is the master Solr.solrconfig.xml
in the master core will have a section like this:whereas the
solrconfig.xml
in the slave will have a section that looks more or less like this:More details https://github.com/hectorcorrea/solr-for-newbies/blob/code4lib_2018/tutorial.md#solr-replication