Skip to content

DRIVERS-3308: Support nested fields in vector search#39

Merged
paulinevos merged 2 commits into
mongodb:mainfrom
paulinevos:nested
Jun 4, 2026
Merged

DRIVERS-3308: Support nested fields in vector search#39
paulinevos merged 2 commits into
mongodb:mainfrom
paulinevos:nested

Conversation

@paulinevos

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 8, 2026 14:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds specification support for nested-field behavior in the $vectorSearch stage by documenting a new configuration object and providing a corresponding example pipeline.

Changes:

  • Added an optional nestedOptions argument (object) with a scoreMode sub-argument to control scoring for nested arrays.
  • Added a new “Nested field” example pipeline demonstrating nested paths and nested scoring configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread definitions/stage/vectorSearch.yaml
Comment thread definitions/stage/vectorSearch.yaml

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.

Comment thread definitions/stage/vectorSearch.yaml
Comment thread definitions/stage/vectorSearch.yaml
Comment thread definitions/stage/vectorSearch.yaml
@paulinevos paulinevos force-pushed the nested branch 2 times, most recently from b2ca34b to 088802d Compare June 1, 2026 13:19
Copilot AI review requested due to automatic review settings June 1, 2026 13:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread definitions/stage/vectorSearch.yaml

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 2 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

definitions/stage/vectorSearch.yaml:269

  • All other $vectorSearch examples in this file include a schema: block, but this new nested-field example does not. Adding a schema keeps examples consistent and improves validation of nested paths used by filter, parentFilter, and path.
          score:
            $meta: vectorSearchScore

@kevinAlbs kevinAlbs left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM with minor comments (Apologies for the delayed review. Vector search is a novel to me).

Comment thread definitions/stage/vectorSearch.yaml Outdated
Comment thread definitions/stage/vectorSearch.yaml
It's not mentioned anywhere in the docs (or ever has been), and I'm
unsure where it camefrom. Removing it for clarity.
@paulinevos paulinevos merged commit 04057be into mongodb:main Jun 4, 2026
3 checks passed
@paulinevos paulinevos deleted the nested branch June 4, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants