定义
$vectorSearch$vectorSearch对Atlas 集群中的数据执行语义搜索。If you store vector embeddings on your Atlas cluster, you can seamlessly index the vector data along with your other collection data. You can use the
$vectorSearchstage to pre-filter your data and perform semantic search against the indexed fields.矢量数据的宽度必须小于或等于 8192 维度。
兼容性
$vectorSearch聚合管道阶段在以下环境中可用:
MongoDB Atlas clusters running version 6.0.11 or later
MongoDB Enterprise 部署运行版本为 8.2 或更高版本的 Kubernetes 操作符
MongoDB Community 运行版本8.2或更高的部署
To learn more, see MongoDB Vector Search.
行为
从MongoDB8.0 开始,您可以在 阶段中使用$vectorSearch $unionWith阶段。
限制
了解详情
To learn more about creating MongoDB Vector Search indexes, see Index Vector Embeddings.
To learn more about
$vectorSearchpipeline stage syntax and usage, see Vector Search Queries.