Package | Description |
---|---|
com.mongodb |
The core mongodb package
|
com.mongodb.async.client |
This packages contains classes for the new async client
|
com.mongodb.client |
This package contains classes for the new client api for MongoDatabase and MongoCollection
|
com.mongodb.client.gridfs |
This package contains the new GridFS implementation
|
com.mongodb.client.model |
This package contains models and options that help describe MongoCollection operations
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
MongoCollectionImpl.createIndex(Bson keys,
IndexOptions indexOptions) |
java.lang.String |
MongoCollectionImpl.createIndex(ClientSession clientSession,
Bson keys,
IndexOptions indexOptions) |
Modifier and Type | Method and Description |
---|---|
void |
MongoCollection.createIndex(Bson key,
IndexOptions options,
SingleResultCallback<java.lang.String> callback)
Creates an index.
|
void |
MongoCollectionImpl.createIndex(Bson key,
IndexOptions indexOptions,
SingleResultCallback<java.lang.String> callback) |
void |
MongoCollection.createIndex(ClientSession clientSession,
Bson key,
IndexOptions options,
SingleResultCallback<java.lang.String> callback)
Creates an index.
|
void |
MongoCollectionImpl.createIndex(ClientSession clientSession,
Bson key,
IndexOptions indexOptions,
SingleResultCallback<java.lang.String> callback) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
MongoCollection.createIndex(Bson keys,
IndexOptions indexOptions)
Create an index with the given keys and options.
|
java.lang.String |
MongoCollection.createIndex(ClientSession clientSession,
Bson keys,
IndexOptions indexOptions)
Create an index with the given keys and options.
|
Modifier and Type | Method and Description |
---|---|
private <T> void |
GridFSBucketImpl.createIndex(ClientSession clientSession,
MongoCollection<T> collection,
Document index,
IndexOptions indexOptions) |
Modifier and Type | Field and Description |
---|---|
private IndexOptions |
IndexModel.options |
Modifier and Type | Method and Description |
---|---|
IndexOptions |
IndexOptions.background(boolean background)
Should the index should be created in the background
|
IndexOptions |
IndexOptions.bits(java.lang.Integer bits)
Sets the number of precision of the stored geohash value of the location data in 2d indexes.
|
IndexOptions |
IndexOptions.bucketSize(java.lang.Double bucketSize)
Sets the specified the number of units within which to group the location values for geoHaystack Indexes
|
IndexOptions |
IndexOptions.collation(Collation collation)
Sets the collation options
|
IndexOptions |
IndexOptions.defaultLanguage(java.lang.String defaultLanguage)
Sets the language for the text index.
|
IndexOptions |
IndexOptions.expireAfter(java.lang.Long expireAfter,
java.util.concurrent.TimeUnit timeUnit)
Sets the time to live for documents in the collection
|
IndexOptions |
IndexModel.getOptions()
Gets the index options.
|
IndexOptions |
IndexOptions.languageOverride(java.lang.String languageOverride)
Sets the name of the field that contains the language string.
|
IndexOptions |
IndexOptions.max(java.lang.Double max)
Sets the upper inclusive boundary for the longitude and latitude values for 2d indexes..
|
IndexOptions |
IndexOptions.min(java.lang.Double min)
Sets the lower inclusive boundary for the longitude and latitude values for 2d indexes..
|
IndexOptions |
IndexOptions.name(java.lang.String name)
Sets the name of the index.
|
IndexOptions |
IndexOptions.partialFilterExpression(Bson partialFilterExpression)
Sets the filter expression for the documents to be included in the index
|
IndexOptions |
IndexOptions.sparse(boolean sparse)
Should the index only references documents with the specified field
|
IndexOptions |
IndexOptions.sphereVersion(java.lang.Integer sphereVersion)
Sets the 2dsphere index version number.
|
IndexOptions |
IndexOptions.storageEngine(Bson storageEngine)
Sets the storage engine options document for this index.
|
IndexOptions |
IndexOptions.textVersion(java.lang.Integer textVersion)
Set the text index version number.
|
IndexOptions |
IndexOptions.unique(boolean unique)
Should the index should be unique.
|
IndexOptions |
IndexOptions.version(java.lang.Integer version)
Sets the index version number.
|
IndexOptions |
IndexOptions.weights(Bson weights)
Sets the weighting object for use with a text index.
|
Constructor and Description |
---|
IndexModel(Bson keys,
IndexOptions options)
Construct an instance with the given keys and options.
|