-
Notifications
You must be signed in to change notification settings - Fork 244
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
DRIVERS-2768 [Vector Search GA] Add support for types in search index creation #1541
Merged
+310
−17
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0de1a9a
DRIVERS-2768 [Vector Search GA] Add support for the new type field wh…
NoahStapp dc8f737
Update changelog
NoahStapp 4336d00
Add spec test for vectorSearch
NoahStapp 3b8ee0a
Add missing tests to yml
NoahStapp 850f12f
Fix schemas
NoahStapp c8918f9
Move type to SearchIndexModel, uncouple tests
NoahStapp 8a2f326
Remove default for search index type
NoahStapp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -693,6 +693,16 @@ Common API Components | |
*/ | ||
name: String; | ||
|
||
/** | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note: we just switched this spec to Markdown, so you'll have to move these changes to that file. |
||
* Optionally specify a type for the index. Defaults to "search" if not provided. | ||
* Either "search" for regular search indexes or "vectorSearch" for vector search indexes. | ||
* | ||
* Note that to create a vector search index using a helper method, the type "vectorSearch" must be provided. | ||
* | ||
*/ | ||
type: String; | ||
|
||
|
||
/** | ||
* Optionally tells the index to only reference documents with the specified field in | ||
* the index. | ||
|
@@ -1149,3 +1159,4 @@ Changelog | |
:2023-07-27: Add search index management clarifications. | ||
:2023-11-08: Clarify that ``readConcern`` and ``writeConcern`` must not be | ||
applied to search index management commands. | ||
:2024-03-06: Update tests to include search index typing. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Many other driver options are implemented such that we only send a value if the user explicitly provides one. How do you feel about mandating that driver MUST NOT send this field if not provided?
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.
Makes sense to me if that's a consistent pattern among drivers. The server should default to
search
implicitly iftype
is not provided, so the behavior is consistent.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.
Should this change be made to the
CreateSearchIndexOptions
instead ofIndexOptions
? https://github.com/mongodb/specifications/blob/master/source/index-management/index-management.md#common-interfacesThere 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.
CreateSearchIndexOptions
is currently unused. If drivers support addingtype
toIndexOptions
, that seems to be a better fit as then the top-level fields oftype
andname
are present in the same interface.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.
Actually, looking more closely it probably belongs in the
SearchIndexModel
?IndexOptions
is used for regular indexes, not search indexes.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.
Oh good catch! Yes,
SearchIndexModel
seems like the correct place fortype
.