-
Notifications
You must be signed in to change notification settings - Fork 26
DOCSP-33408: Add $vectorSearch documentation #208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Really nice job. A few suggestions and small things to clarify
source/fundamentals/linq.txt
Outdated
public double[] Embedding { get; set; } | ||
} | ||
|
||
The following example shows how to use LINQ to generate a ``$vectorSearch`` stage to search |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not really LINQ. It's just IMongoQueryable
is the entry point for VectorSearch stage, as well as for LINQ expressions. But the next Select
statement is part of LINQ..
] | ||
} | ||
|
||
$vectorSearch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part looks good.
VectorSearch is not only limited to IMongoQueryable. We also have builders and Fluent API options. I think it's worth documenting all options.
Also should we have a separate page for VectorSearch
(like we do for AtlasSearch
) to increase visibility? cc @rishitb-mongodb?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was curious about this point and would like to hear Rishit's PoV – I originally didn't add documentation to the Builders page we have since it didn't seem that there was a specific builder for the VectorSearch stage (i.e. nothing like a Builders.VectorSearch) like there is for the other stages on that page (e.g. Project, Sort)
I'd also want to be wary of duplicating information – there is ample documentation on Vector Search in Atlas already so I'd prefer to link to that when able, unless there are C# driver-specific quirks that are worth calling out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I'm struggling with the "natural" place to describe Vector Search in our docs since it seems like neither Builders nor LINQ is fully appropriate. The two options that make the most sense to me are either a new section in the Aggregations page which briefly touches on Vector Search, or a brand new page (as you mentioend). Seconding your request to @rishitb-mongodb for feedback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to have some sort of consistency, either within our documentation (by having a dedicated page for Atlas Vector Search just like we do for Atlas Search) OR with other driver's documentation (which is what the above approach does by mimicing what the Java driver was doing for Atlas Vector Search). I know there is a standardization effort coming soon for this. I didn't know that we have Builders and FluentAPI option for Vector Search as well. If this is the case then I agree this page shouldn't be under LINQ. If a developer can do Vector Search using Builders, Fluent API or LINQ then we should have a dedicated page for it but we don't need to repeat everything in the main Atlas documentation, just redirect to it wherever needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
(cherry picked from commit dd7d7e6)
(cherry picked from commit dd7d7e6)
(cherry picked from commit dd7d7e6)
(cherry picked from commit dd7d7e6)
(cherry picked from commit dd7d7e6)
Pull Request Info
Pardon the long line with the vector definition, the example is taken directly from the Atlas manual.
PR Reviewing Guidelines
JIRA - DOCSP-33408
Staging -
Self-Review Checklist