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

トラブルシューティング

このドキュメントでは、 MongoDB ベクトル検索の問題をトラブルシューティングするためのアドバイスを提供します。 MongoDB ベクトル検索 の問題を直接サポートするには、 Reddit またはStack OverflowのMongoDBコミュニティでディスカッションを開始するか、 サポートにお問い合わせください 。

$vectorSearchパイプラインステージを使用してクラスターをクエリするには、クラスターでMongoDB 7.0.2+ を実行する必要があります。互換性のないバージョンのMongoDBで $vectorSearch を呼び出すと、次のエラーが表示される場合があります。

OperationFailure: $vectorSearch is not allowed with the current
configuration. You may need to enable the corresponding feature
flag.

クラスターの MongoDB バージョンを確認するには:

1
  1. まだ表示されていない場合は、希望するプロジェクトを含む組織を選択しますナビゲーション バーのOrganizationsメニュー

  2. まだ表示されていない場合は、ナビゲーション バーのProjectsメニューから目的のプロジェクトを選択します。

  3. サイドバーで、 Database見出しの下のClustersをクリックします。

[ Clusters (クラスター) ] ページが表示されます。

2

$vectorSearchを使用するクラスターの情報ペインを見つけます。

3

情報ペインの下部のセクションでVersionの数字を確認します。

If your cluster runs a version of MongoDB earlier than 6.0.11 or 7.0.2, you must upgrade the MongoDB version of the cluster.

クエリ パフォーマンスの向上に関する推奨事項については、 MongoDB ベクトル検索のベンチマーク を参照してください。

$vectorSearch クエリで結果が返されない場合は、次のアクションを実行します。

  • データとクエリの両方に同じ埋め込みモデルを使用していることを確認します。 データの埋め込みに使用するモデルとは異なるモデルを使用してクエリを埋め込んだ場合、$vectorSearch は一致を識別できません。

  • Ensure that your MongoDB Vector Search has finished building. When you create or update a MongoDB Vector Search index, the index the index is in an initial sync state. When it finishes building, you can start querying the data in your collection.

LangChain を使用して RAG を事前フィルタリングで実行すると、次のエラーが発生する可能性があります。

Error during the document retrieval or generation process:
MongoServerError: PlanExecutor error during aggregation :: caused
by :: Path 'field' needs to be indexed as token

If an index on field exists, ensure you have created this index as a MongoDB Vector Search index, not a MongoDB Search index. If no index on field exists, create one. To learn more about implementing RAG with MongoDB Vector Search and LangChain, see Answer Questions on Your Data.

MongoDB ベクトル検索インデックスをプログラムで作成しようとすると、Command not found エラーが発生する可能性があります。このエラーは、次の 2 つの理由のいずれかで発生します。

MongoDB ベクトル検索 は現在、ブール値、日付、数値、ObjectId、string、および UUID 値を持つフィールドのみのフィルタリングをサポートしています。 詳しくは、「 filter 型について 」を参照してください。