タグの(個別の)リストが必要な場合は、個別を使用するのが最適です。 Map / Reduceは遅くなり、javascript部分のインデックスを使用できなくなります。
https://docs.mongodb.org/manual/reference/ method / db.collection.distinct /
db.coll.distinct("tags", {type:1}) type=1のタグのセットを返します。
タグの(個別の)リストが必要な場合は、個別を使用するのが最適です。 Map / Reduceは遅くなり、javascript部分のインデックスを使用できなくなります。
https://docs.mongodb.org/manual/reference/ method / db.collection.distinct /
db.coll.distinct("tags", {type:1}) type=1のタグのセットを返します。