定义
重要
$vectorSearch聚合管道阶段仅适用于在运行MongoDB.. 或更高版本的MongoDB Atlas 6011群集层上托管的集合。要学习;了解更多信息,请参阅Atlas Vector Search。
$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 维度。
行为
从MongoDB8.0 开始,您可以在 阶段中使用$vectorSearch $unionWith阶段。
限制
了解详情
要学习;了解有关创建Atlas Vector Search索引的更多信息,请参阅索引向量嵌入。
To learn more about
$vectorSearchpipeline stage syntax and usage, see Vector Search Queries.