-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Critical - P2
-
None
-
Affects Version/s: 1.2.2
-
Component/s: None
-
Labels:None
-
Environment:PHP 7.0.10 64 bit
MongoDB 3.4 64 bit
php_mongodb-1.2.2-7.0-ts-vc14-x64
mongo-php-library v1.1
Windows 10 64 bit
Apache 2.4 64 bit
Hi
I cannot create index with collation on my local env.
Script:
$result = $collection->createIndex(array('city' => 1), array('collation' => array('locale' => "en", 'strength' => 2)));
Error:
Invalid index specification { key:
, collation:
{ locale: "en", strength: 2 }, ns: "orgDb.testing", name: "city_1" }; cannot create an index with the 'collation' option and v=1
...\vendor\mongodb\mongodb\src\Operation\CreateIndexes.php:138
When I do the same thing on my prod. setup it works!
Windows Server 2012 R2 Standard 64 bit
PHP 7.0.09 64bit
MongoDB 3.4 64 bit
php_mongodb-1.2.2-7.0-nts-vc14-x64
mongo-php-library v1.1
IIS