如何在solr中动态地将分片添加到集合中? [英] How to add shards dynamically to collection in solr?

查看:79
本文介绍了如何在solr中动态地将分片添加到集合中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在创建集合时使用以下查询,我为 collection10 设置了两个分片.

Using the following query when I create the collection I set two shards for the collection10.

/solr/admin/collections?action=CREATE&name=collection10&numShards=2&replicationFactor=2

但是我的要求是,在前两个分片中索引了 10000 个文档后,我必须动态添加第三个分片.

But what is my requirement is, I have to add 3rd shard dynamically after 10000 documents has been indexed in first two shards.

一旦我们在现有分片上开始收集和索引,是否可以动态添加分片?如果可以的话是指如何在我们开始收集后动态添加一次分片?

Is it possible to add shards dynamically once we started the collection and indexing at existing shards? If it possible means how to add shards dynamically once after we started the collection?

而且,一旦我们开始收集,是否可以动态添加副本.例如我设置了replicationFactor=2,然后我需要为已经开始的集合开始新的复制.有可能吗?如果是,怎么办?

And also, is it possible to add replicas dynamically once we started the collection.For example I set replicationFactor=2, then later I need to start the new replication for the already started collection. Is it possible to do? If it so, how to do it?

推荐答案

现在可以使用 Solr 4.4.0(4.3 中引入的功能):

Now it's possible with Solr 4.4.0 (feature introduced in 4.3):

https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-SplitaShard

这篇关于如何在solr中动态地将分片添加到集合中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆