diff --git a/src/CollectionManager.php b/src/CollectionManager.php index 5dd1e9f..e32420c 100644 --- a/src/CollectionManager.php +++ b/src/CollectionManager.php @@ -89,7 +89,7 @@ public function create(string $name, array $options = []): ResultInterface $defaults = [ 'num_shards' => 1, 'router_name' => 'compositeId', - 'nrt_replicas' => 1, // alias: replication_factor + 'nrt_replicas' => 1, 'tlog_replicas' => 0, 'pull_replicas' => 0, @@ -112,7 +112,7 @@ public function create(string $name, array $options = []): ResultInterface ->setNumShards($options['num_shards']) ->setRouterName($options['router_name']) - ->setNrtReplicas($options['nrt_replicas'] ?? $options['replication_factor']) + ->setNrtReplicas($options['nrt_replicas']) ->setPullReplicas($options['pull_replicas']) ->setTlogReplicas($options['tlog_replicas']) diff --git a/tests/Integration/CollectionManagerTest.php b/tests/Integration/CollectionManagerTest.php index 4f90b56..1c6a6cc 100644 --- a/tests/Integration/CollectionManagerTest.php +++ b/tests/Integration/CollectionManagerTest.php @@ -33,7 +33,7 @@ public function it_creates_collection_with_options() { $this->manager->create('foo', [ 'num_shards' => 2, - 'nrt_replicas' => 2, // alias: replication_factor + 'nrt_replicas' => 2, 'pull_replicas' => 1, 'tlog_replicas' => 1, 'router_name' => 'compositeId',