Indexing Java Flashcards
1
Q
Code an example creating a compound index in ascending order
A
collection.createIndex(Indexes.compoundIndex(Indexes.ascending(field), Indexes.ascending(field2)));
2
Q
Which factory class can be used to create indexes
A
The Indexes
class