Unique index in mongoDB 3.2 ignoring null values
I am adding this answer as I was looking for a solution and didn’t find one. This may not answer exactly this question or may be, but will help lot of others out there like me. Example. If the field with null is houseName and it is of type string, the solution can be like …