Indexing on a field which is in array of subdocuments

后端 未结 1 752
余生分开走
余生分开走 2021-01-04 08:53

I\'m trying to figure out the best design for the messaging system I\'m porting from SQL Server to MongoDB - currently (in SQL Server) there are tree tables that store the m

相关标签:
1条回答
  • 2021-01-04 09:38

    see here https://docs.mongodb.com/manual/indexes/#multikey-index

    Index by a field of a document in an array is supported by mongodb.

    Example:

    { addr.zip: 1 }
    
    0 讨论(0)
提交回复
热议问题