Skip to content

Conversation

GromNaN
Copy link
Member

@GromNaN GromNaN commented Oct 3, 2025

Q A
Type documentation
BC Break no
Fixed issues PHPORM-346

Summary

Add a tutorial to use Vector Search with an embedding model.

@GromNaN GromNaN added this to the 2.13.0 milestone Oct 3, 2025
@GromNaN GromNaN requested a review from Copilot October 3, 2025 13:26
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines 163 to 164
->queryVector(self::getVector())
->filter($qb->expr()->field('published')->equals(true))
Copy link
Preview

Copilot AI Oct 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]).

Suggested change
->queryVector(self::getVector())
->filter($qb->expr()->field('published')->equals(true))
->queryVector($vectors)
->filter(['published' => true])

Copilot uses AI. Check for mistakes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The suggestion is incorrect, even if I find it interesting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant