Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumMongoDBmultikey array indexesSingle-choice MCQ

Why can MongoDB not build a compound index where two of the indexed fields are both arrays in the same document?

// index: { tags: 1, scores: 1 } // doc: { tags: ["a","b"], scores: [1,2] }