I have a mongodb collection like
{
template_id: { type: String, required: true },
owner: {
user_id: { type: String, required: true }
},
assignee: {
user_id: { type: String, required: false }
}
//...other fields
}
There is a compound index (non-sparse & non-unique) for this document,
{ template_id: 1, owner: 1, assignee: 1 }
In this document the assignee may have value or may be null. However, the query pattern for fetching records having null is important.
Are records having null values indexed so that I can use for querying based in them?