apiargs-MongoDBCollection-method-createIndexes-param.yaml 522 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
arg_name: param
name: $indexes
type: array
description: |
  The indexes to create on the collection.

  For example, the following specifies a unique index on the ``username`` field
  and a compound index on the ``email`` and ``createdAt`` fields:

  .. code-block:: php

     [
         [ 'key' => [ 'username' => -1 ], 'unique' => true ],
         [ 'key' => [ 'email' => 1, 'createdAt' => 1 ] ],
     ]
interface: phpmethod
operation: ~
optional: false
---
source:
  file: apiargs-common-param.yaml
  ref: $options
...