在创建集合时使用以下查询,我为 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):
cwiki.apache/confluence/display/solr/Collections+API#CollectionsAPI-SplitaShard
更多推荐
如何在solr中动态地将分片添加到集合中?
发布评论