-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed as not planned
Labels
status: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently apply
Description
While working with MongoOperations and IndexOperations, and it hard to validate when an index has been created with background or not.
Mongo version: 7.0.12
SpringData MongoDB version: 4.2.4
Simple Java Code:
IndexDefinition definition = new Index()
.on("field", Sort.Direction.ASC)
.background();
mongoOperations.indexOps(IndexedClass.class).ensureIndex(indexDefinition);
mongoOperations.indexOps(IndexedClass.class).getIndexInfo();
// No way to validate whether background option exists on the indexLooking at Mongo, it seems to keep track of it:
db.getCollection('indexedClass').getIndexes()
[
{ v: 2, key: { _id: 1 }, name: '_id_' },
{ v: 2, key: { field: 1 }, name: 'field_1', background: true }
]
Please include background property to IndexInfo
Metadata
Metadata
Assignees
Labels
status: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently apply