MongoDB 优化之倒排索引

为 MongoDB 中的数据构建倒排索引 (Inverted Index),然后缓存到内存中,可以大幅提升搜索性能。本文将通过为电影数据构建演员索引,介绍两种构建倒排索引的方法:MapReduce 和 Aggregation Pipeline。