MongoDB Vector Search enables AI-powered semantic search capabilities in your Kubernetes environment by deploying the mongot process alongside your MongoDB database deployment (mongod). The mongot process manages vector indexes, sources data from the database, and processes $vectorSearch queries. This eliminates the need to maintain separate systems in sync while providing advanced search features.
ベクトル検索を配置するには、Kubernetes 演算子が検出して mongot ポッドを配置し、spec で指定された永続ストレージをリクエストする MongoDBSearch カスタム リソース (CR)を適用します。
配置手順については、MongoDB Search とベクトル検索を配置する。を参照してください。
The mongot Process
各 mongot プロセスには、データベースや他の検索ノードと共有されない固持ボリュームがあります。ストレージは、データベースから継続的に取得されるデータから構築されるベクトル インデックスを維持するために使用されます。インデックス定義 (メタデータ) はデータベース自体に保存されます。
mongot は、次のアクションを実行します。
ベクトル インデックスを管理します。
mongotは、データベース内のインデックス定義を更新します。データベースからデータを取得します。
mongotノードは、データベースへの永続的な接続を確立し、データベースからインデックスをリアルタイムで更新します。ベクトル検索クエリを処理します。
When
mongodreceives a$vectorSearchquery, it directs the query to one of themongotnodes. Themongotthat receives the query processes the query, aggregates the data, and returns the results tomongod, which forwards the results to the user.
mongot コンポーネントは 1 つのMongoDBレプリカセットと厳密に結合されているため、複数のデータベースやレプリカセットで共有することはできません。各レプリカセット配置には、専用の検索ノードがあります。
ネットワーキング
mongot と mongod の間のネットワーク接続は両方向で行われます。
mongotは、インデックスの構築とクエリの実行に使用されるデータを取得するためにレプリカセットへの接続を確立します。mongodはmongotに接続して、インデックス マネジメントやデータのクエリなどの検索関連の操作を転送します。
mongod は、すべての検索クエリのプロキシとして機能します。mongot と直接交流することはありません。
演算子マネージド配置
mongot プロセスと mongod プロセスの両方がKubernetesクラスター内に配置されている場合、Kubernetes Operator は両方のプロセスの構成を自動的に実行します。具体的には、Kubernetes Operator は次のことを行います。
Finds the MongoDB CR referenced by MongoDBSearch using
spec.source.mongodbResourceRef, or by a naming convention by looking for the MongoDB CR with the same name as MongoDBSearch.Generates
mongotconfiguration in a YAML file and saves it to a config map named<MongoDBSearch.metadata.name>-search-config.Deploys the Vector Search stateful set named
<MongoDBSearch.metadata.name>-searchwith storage and resource requirements configured according tospec.persistenceandspec.resourceRequirementsin the CR.mongotホストのホスト名とポート番号を含む必要なsetParameterオプションを追加して、すべてのmongodプロセスの構成を更新します。
外部 MongoDB 配置
MongoDB レプリカセットが Kubernetes の外にある場合は、Kubernetes 演算子を使用して mongot を配置し、手動でいくつかの手順を実行します。Kubernetes 演算子は検索ポッドの構成を取り扱いますが、MongoDB ノードとネットワークを再構成する必要があります。
セキュリティ
If the MongoDB server is inside the Kubernetes cluster, the Kubernetes Operator automatically sets up keyfile authentication for Vector Search. If the MongoDB server is external, you must create a Kubernetes Secret containing the replica set's keyfile credential and reference it in the MongoDBSearch CR.
制限
次のアーキテクチャにはベクトル検索を配置できません。
IBM Power (ppc64le)
IBM Z (s390x)
Tip
MongoDB Search とベクトル検索を配置する — MongoDB Search とベクトル検索を配置する
MongoDB Search およびベクトル検索設定 — MongoDB Search CR 設定