Skip to main content
编辑本页

AggregateOptions

Options used to configure aggregate operations.

Name

Type

Description

@allowDiskUse

Boolean

Set the flag if writing to temporary files is enabled.

@batchSize

Number (int)

Set the batch size for methods loading found data in batches.

@maxAwaitTime

Number (long)

The maximum amount of time for the server to wait on new documents to satisfy a $changeStream aggregation.

@maxTime

Number (long)

Set the time limit in milliseconds for processing operations on a cursor.

BulkOperation

Contains all data needed for one operation of a bulk write operation.

Name

Type

Description

@document

Json object

Sets the document, used by insert, replace, and update operations

@filter

Json object

Sets the filter document, used by replace, update, and delete operations

@multi

Boolean

Sets the multi flag, used by update and delete operations

@type

BulkOperationType

Sets the operation type

@upsert

Boolean

Sets the upsert flag, used by update and replace operations

BulkWriteOptions

Options for configuring bulk write operations.

Name

Type

Description

@ordered

Boolean

Set the ordered option

@writeOption

WriteOption

Set the write option

FindOptions

Options used to configure find operations.

Name

Type

Description

@batchSize

Number (int)

Set the batch size for methods loading found data in batches.

@fields

Json object

Set the fields

@limit

Number (int)

Set the limit

@skip

Number (int)

Set the skip

@sort

Json object

Set the sort document

IndexOptions

Options used to configure index.

Name

Type

Description

@background

Boolean

Create the index in the background

@bits

Number (Integer)

Gets the number of precision of the stored geohash value of the location data in 2d indexes.

@bucketSize

Number (Double)

Gets the specified the number of units within which to group the location values for geoHaystack Indexes

@defaultLanguage

String

Gets the language for a text index.

The language that determines the list of stop words and the rules for the stemmer and tokenizer.

@languageOverride

String

Gets the name of the field that contains the language string.

For text indexes, the name of the field, in the collection's documents, that contains the override language for the document.

@max

Number (Double)

Gets the upper inclusive boundary for the longitude and latitude values for 2d indexes..

@min

Number (Double)

Gets the lower inclusive boundary for the longitude and latitude values for 2d indexes..

@name

String

Gets the name of the index.

@partialFilterExpression

Json object

Get the filter expression for the documents to be included in the index or null if not set

@sparse

Boolean

If true, the index only references documents with the specified field

@sphereVersion

Number (Integer)

Gets the 2dsphere index version number.

@storageEngine

Json object

Gets the storage engine options document for this index.

@textVersion

Number (Integer)

The text index version number.

@unique

Boolean

Gets if the index should be unique.

@version

Number (Integer)

Gets the index version number.

@weights

Json object

Gets the weighting object for use with a text index

A document that represents field and weight pairs. The weight is an integer ranging from 1 to 99,999 and denotes the significance of the field relative to the other indexed fields in terms of the score.

MongoClientBulkWriteResult

Result propagated from mongodb driver bulk write result.

Name

Type

Description

@deletedCount

Number (long)

Returns the number of deleted documents

@insertedCount

Number (long)

Returns the number of inserted documents

@matchedCount

Number (long)

Returns the number of matched documents

@modifiedCount

Number (long)

Returns the number of modified documents

@upserts

Array of Json object

An unmodifiable list of upsert data. Each entry has the index of the request that lead to the upsert, and the generated ID of the upsert.

MongoClientDeleteResult

Result propagated from mongodb driver delete result.

Name

Type

Description

@removedCount

Number (long)

Get the number of removed documents

MongoClientUpdateResult

Result propagated from mongodb driver update result.

Name

Type

Description

@docMatched

Number (long)

Get the number of documents that're matched

@docModified

Number (long)

Get the number of documents that're modified

@docUpsertedId

Json object

Get the document id that's upserted

UpdateOptions

Options for configuring updates.

Name

Type

Description

@multi

Boolean

Set whether multi is enabled

@returningNewDocument

Boolean

Set whether new document property is enabled. Valid only on findOneAnd* methods.

@upsert

Boolean

Set whether upsert is enabled

@writeOption

WriteOption

Set the write option