Skip to content

Conversation

ajcvickers
Copy link
Collaborator

No description provided.

@ajcvickers ajcvickers requested a review from a team as a code owner September 15, 2025 09:15
@ajcvickers ajcvickers requested review from rstam and removed request for a team September 15, 2025 09:15
@ajcvickers ajcvickers marked this pull request as draft September 15, 2025 09:15
@ajcvickers
Copy link
Collaborator Author

@rstam You were assigned as a reviewer automatically; feel free to ignore.

@ajcvickers ajcvickers marked this pull request as ready for review September 16, 2025 11:45
@ajcvickers ajcvickers requested a review from damieng September 16, 2025 11:45
@rstam rstam removed their request for review September 19, 2025 17:52
Copy link
Member

@damieng damieng left a comment

Choose a reason for hiding this comment

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

Looks great, just one small change regarding fixing an exception message formatting.

}

private const string VectorSearchNeedsIndexString =
"A vector query for '{entityType}.{propertyType}' could not be executed because the vector " +
Copy link
Member

Choose a reason for hiding this comment

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

Nice clear helpful error messages with next steps :)

if (vectorIndexesInModel == null || vectorIndexesInModel.Count == 0)
{
ThrowForBadOptions(
$"A vector query for '{entityType!.DisplayName()}.{members[0].Name}' could not be executed because the vector " +
Copy link
Member

Choose a reason for hiding this comment

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

ThrowForBadOptions emits $"A vector query for '{entityType!.DisplayName()}.{members[0].Name}' could not be executed because {reason}"); so everything up to and including "because" here should be dropped.


private sealed class VectorSearchReplacer : ExpressionVisitor
{
private readonly MethodCallExpression _removed;
Copy link
Member

Choose a reason for hiding this comment

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

Nit: two spaces.

@ajcvickers
Copy link
Collaborator Author

@damieng Ready for re-review.

@ajcvickers ajcvickers requested a review from damieng September 23, 2025 09:43
@ajcvickers ajcvickers merged commit dde6963 into mongodb:main Sep 23, 2025
16 checks passed
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.

2 participants