Documentation for Vector Search#2846
Conversation
There was a problem hiding this comment.
Pull Request Overview
Adds documentation for using Vector Search with Doctrine MongoDB ODM, including a new cookbook tutorial and clarifies index requirements in stage reference docs.
- Adds a comprehensive vector search cookbook with end-to-end example.
- Inserts notes in aggregation stage reference about required search/vector search indexes.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| docs/en/reference/aggregation-stage-reference.rst | Adds notes about required indexes for $search and $vectorSearch stages. |
| docs/en/cookbook/vector-search.rst | New tutorial covering embedding generation, model definition, indexing, and querying. |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
docs/en/cookbook/vector-search.rst
Outdated
| ->queryVector(self::getVector()) | ||
| ->filter($qb->expr()->field('published')->equals(true)) |
There was a problem hiding this comment.
The example references self::getVector() (undefined in the tutorial) and $qb (never defined). Use a concrete vector variable (e.g., $doc1->voyage3Vector) and replace the filter with a direct expression array, e.g. ->filter(['published' => true]).
| ->queryVector(self::getVector()) | |
| ->filter($qb->expr()->field('published')->equals(true)) | |
| ->queryVector($vectors) | |
| ->filter(['published' => true]) |
There was a problem hiding this comment.
The suggestion is incorrect, even if I find it interesting.
3affecb to
4eb76e3
Compare
| field or fields which must be covered by an Atlas Vector Search index. | ||
| This stage is only available when using MongoDB Atlas. ``$vectorSearch`` must be | ||
| the first stage in the aggregation pipeline. | ||
| ``$vectorSearch`` must be the first stage in the aggregation pipeline. |
There was a problem hiding this comment.
We don't want to keep the bit about it only being available in Atlas? I guess it's kind of implied by the prior sentence
There was a problem hiding this comment.
The requirements are detailed in the linked MongoDB documentation. The statement that Atlas is required is no longer entirely true with support of search features in the Enterprise version: https://www.mongodb.com/docs/kubernetes/current/tutorial/install-fts-vs-with-enterprise/
paulinevos
left a comment
There was a problem hiding this comment.
This is great. Very clear.
Summary
Add a tutorial to use Vector Search with an embedding model.