关于此任务
设置集群
创建 Vector Search 索引
在本部分中,您将在加载到集群的示例数据上创建MongoDB Vector Search索引:
运行向量搜索查询
在本部分中,您将在索引字段上运行示例MongoDB 向量搜索查询。
故障排除
学习总结
本快速入门重点介绍从集群中检索包含与所提供的查询在语义上相关的文本的文档。但是,您可以在嵌入上创建向量搜索索引,表示您可能写入集群的任何类型的数据,例如图像或视频。
样本数据
向量嵌入
向量索引定义
Vector Search 查询
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.