arg_name: option name: unique type: boolean description: | Creates a :manual:`unique ` index. interface: phpmethod operation: MongoDB\\Collection::createIndex optional: true position: 1 --- arg_name: option name: partialFilterExpression type: array|object description: | Creates a :manual:`partial ` index. interface: phpmethod operation: MongoDB\\Collection::createIndex optional: true position: 2 --- arg_name: option name: sparse type: boolean description: | Creates a :manual:`sparse ` index. interface: phpmethod operation: MongoDB\\Collection::createIndex optional: true position: 3 --- arg_name: option name: expireAfterSeconds type: integer description: | Creates a :manual:`TTL ` index. interface: phpmethod operation: MongoDB\\Collection::createIndex optional: true position: 4 --- arg_name: option name: name type: string description: | Specifies the name for the index. By default, MongoDB creates index names based on the key. interface: phpmethod operation: MongoDB\\Collection::createIndex optional: true position: 5 --- arg_name: option name: background type: string description: | Instructs MongoDB to build the index :manual:`as a background ` process. interface: phpmethod operation: MongoDB\\Collection::createIndex optional: true position: 6 --- arg_name: option name: 2dsphereIndexVersion type: integer description: | Specifies the :manual:`version of a 2dsphere ` index to create. MongoDB 2.6 introduced version 2 of 2dsphere indexes. Version 2 is the default version of 2dsphere indexes created in MongoDB 2.6 and later series. ``2dsphereIndexVersion`` enables you to overrride the default version 2. interface: phpmethod operation: MongoDB\\Collection::createIndex optional: true position: 7 --- arg_name: option name: socketTimeoutMS type: integer description: | Specifies the time limit, in milliseconds, for socket communication. If the :program:`mongod` does not respond within the timeout period, a ``MongoCursorTimeoutException`` is thrown and there will be no way to determine if the server actually handled the write or not. Specify ``-1`` to block indefinitely. The default value is 30000 (30 seconds). interface: phpmethod operation: MongoDB\\Collection::createIndex optional: true position: 8 --- source: ref: maxTimeMS file: apiargs-common-option.yaml operation: MongoDB\\Collection::createIndex position: 9 ...