このタスクについて
クラスターを設定する
ベクトル検索インデックスの作成
このセクションでは、クラスターにロードするサンプルデータにMongoDB Vector Searchインデックスを作成します。
ベクトル検索クエリの実行
このセクションでは、インデックス付きフィールドに対してサンプルMongoDB ベクトル検索クエリを実行します。
トラブルシューティング
学習の概要
このクイック スタートでは、指定されたクエリにセマンティックに関連するテキストを含むドキュメントをクラスターから取得する方法に焦点を当てています。ただし、画像やビデオなど、クラスターに書き込む可能性のある任意のデータを表す埋め込みにベクトル検索インデックスを作成することはできます。
サンプル データ
ベクトル埋め込み
ベクトル インデックスの定義
ベクトル検索クエリ
The query you ran in this quick start is an aggregation pipeline, in which the $vectorSearch stage performs an Approximate Nearest Neighbor (ANN) search followed by a $project stage that refines the results. To see all the options for a semantic search query, including using Exact Nearest Neighbor (ENN) or how to narrow the scope of your semantic search with the filter option, see Run Vector Search Queries.