1.

You can combine the ________ constraint with the sparse index to filter these null values from the unique index and avoid the error.(a) Hashed(b) Unique(c) Sparse(d) CompoundI had been asked this question in a job interview.My query is from Index Properties in chapter Index/Indexing Concepts of MongoDB

Answer»

Correct option is (c) Sparse

To EXPLAIN I would say: If a document does not have a value for the INDEXED field in a unique index, the index will STORE a NULL value for this document.



Discussion

No Comment Found

Related InterviewSolutions