.MongoCollection.Indexes.Add (gb.mongodb)

Function Add ( Keys As Collection [ , Options As Collection ] ) As String

Create a new index.

  • Keys : The description of the index.

  • Options : The index options.

Return the name of the new index as automatically generated by the MongoDB library.

See the MongoDB documentation for the syntax of these arguments:

The arguments of the method is one index description of the "indexes" argument of the MongoDB index creation command. Keys is the "key" argument of the index description, whereas Options are the other sibling arguments of the same index description.