[英]when creating shards in solr…“shards can be added only to 'implicit' collections”
We don't need SPLITSHARD. 我们不需要SPLITSHARD。 I have given numShards=1 while creating a collection.
创建集合时,我给出了numShards = 1。 We need shard2 for the same collection.
对于同一集合,我们需要shard2。 we are getting below error while creating shard2 for the same collection.
我们为同一集合创建shard2时遇到错误。
Error:shards can be added only to 'implicit' collections 错误:碎片只能添加到“隐式”集合
There are two methods of router implementation used by collection. 收集使用两种实现路由器的方法。
default
is "compositeId" router. default
为“ compositeId”路由器。
So if Collection is created with compositeId
router method, we cannot create new shard . 因此,如果Collection是使用
compositeId
路由器方法创建的 , 则无法创建新的shard 。 Only possible way is to split the existing shard. 唯一可行的方法是拆分现有分片。
As error indicates shards can be added only to 'implicit' collections 错误指示分片只能添加到“隐式”集合
If you create the collection with implicit
router you can add shards. 如果使用
implicit
路由器创建集合,则可以添加分片。 you can additionally define a router.field
parameter to use a field from each document to identify a shard where the document belongs. 您还可以定义
router.field
参数,以使用每个文档中的字段来标识文档所属的分片。 If the field specified is missing in the document, however, the document will be rejected 但是,如果文档中缺少指定的字段,则该文档将被拒绝
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.