AI エージェント向け: ドキュメントインデックスは https://www.mongodb.com/ja-jp/docs/llms.txt で利用できます。すべてのページの markdown バージョンは、いずれかの URL パスに .md を追加することで利用できます。
Docs Menu

永続的なクエリ設定の移行

ソースクラスターが永続クエリ設定(PQS) を使用する場合、同期を完了するには、それらの設定を宛先クラスターに手動で移行する必要があります。

mongosync checks for PQS during initialization and the cutover process. If mongosync finds PQS on the source cluster during cutover, Mongosync shows a warning. Use the following procedure to address the warning and migrate your PQS to your destination cluster.

1

次のコード ブロックを実行して、クエリ設定を配列に出力します。

mongosh --eval
'console.log(db.aggregate([{$querySettings:{}}]).toArray())'
2

For each query setting that you want to migrate, use setQuerySettings to apply that setting to your destination cluster.

クエリ設定に representativeQueryフィールド値が含まれている場合は、そのフィールド値を setQuerySettings 値として使用します。

それ以外の場合は、querySettings 配列の queryShapeHashフィールド値を setQuerySettings 値として使用します。