apiargs-MongoDBCollection-method-createIndex-option.yaml 1.9 KB
Newer Older
1 2 3 4 5 6
arg_name: option
name: unique
type: boolean
description: |
  Creates a :manual:`unique </core/index-unique>` index.
interface: phpmethod
7
operation: ~
8
optional: true
9 10 11 12 13 14 15
---
source:
  file: apiargs-MongoDBCollection-common-option.yaml
  ref: collation
pre: |
  Specifies the :manual:`collation
  </reference/bson-type-comparison-order/#collation>` for the index.
16 17 18 19 20 21 22
---
arg_name: option
name: partialFilterExpression
type: array|object
description: |
  Creates a :manual:`partial </core/index-partial>` index.
interface: phpmethod
23
operation: ~
24 25 26 27 28 29 30 31
optional: true
---
arg_name: option
name: sparse
type: boolean
description: |
  Creates a :manual:`sparse </core/index-sparse>` index.
interface: phpmethod
32
operation: ~
33 34 35 36 37 38 39 40
optional: true
---
arg_name: option
name: expireAfterSeconds
type: integer
description: |
  Creates a :manual:`TTL </core/index-ttl>` index.
interface: phpmethod
41
operation: ~
42 43
optional: true
---
44 45 46
source:
  file: apiargs-common-option.yaml
  ref: maxTimeMS
47 48
post: |
  .. versionadded:: 1.3
49
---
50 51 52
arg_name: option
name: name
type: string
53
description: |
54 55
  A name that uniquely identifies the index. By default, MongoDB creates index
  names based on the key.
56
interface: phpmethod
57
operation: ~
58 59 60 61 62
optional: true
---
arg_name: option
name: background
type: string
63
description: |
64 65 66
  Instructs MongoDB to build the index :manual:`as a background
  </core/index-creation>` process.
interface: phpmethod
67
operation: ~
68 69 70 71 72 73
optional: true
---
arg_name: option
name: 2dsphereIndexVersion
type: integer
description: |
74 75
  Overrides the server's default version for a :manual:`2dsphere
  </core/2dsphere>` index.
76
interface: phpmethod
77
operation: ~
78 79
optional: true
---
80 81 82
source:
  file: apiargs-common-option.yaml
  ref: session
83 84
post: |
  .. versionadded:: 1.3
85
---
86
source:
87 88 89 90 91
  file: apiargs-MongoDBCollection-common-option.yaml
  ref: writeConcern
post: |
  This is not supported for server versions prior to 3.4 and will result in an
  exception at execution time if used.
92
...