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)));
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which factory class can be used to create indexes

A

The Indexes class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly