diff --git a/source/index-management/index-management.md b/source/index-management/index-management.md index 667af29530..ab0d0ff945 100644 --- a/source/index-management/index-management.md +++ b/source/index-management/index-management.md @@ -902,19 +902,39 @@ await collection.dropSearchIndex('my-test-index'); ```typescript interface SearchIndexModel { - // The definition for this index. + /** + * Document describing the index to create. + * + * The definition syntax depends on whether you create a standard search index + * or a vector search index. + * + * @see https://www.mongodb.com/docs/manual/reference/command/createSearchIndexes/ + */ definition: Document; - // The name for this index, if present. - name: Optional; - - // The type for this index, if present. Can be either "search" or "vectorSearch". - type: Optional; + /** + * Contains the options for the index. + */ + options: SearchIndexOptions; } interface SearchIndexOptions { - // The name for this index, if present. + /** + * Name of the search index to create. + * + * The server will use "default" if this option is not specified. + */ name: Optional; + + /** + * Type of search index to create. Defaults to "search" if not provided. + * + * Specify "search" for a standard search index or "vectorSearch" for a vector + * search index. + * + * The server will use "search" if this option is not specified. + */ + type: Optional; } /** @@ -1125,6 +1145,10 @@ from mistakenly specifying this option, drivers manually verify it is only sent #### Changelog +- 2024-09-05: Moved options in SearchIndexModel to SearchIndexOptions for consistency with IndexModel and IndexOptions. + +- 2024-03-06: Added `type` option to SearchIndexOptions. + - 2024-03-05: Migrated from reStructuredText to Markdown. - 2023-11-08: Clarify that `readConcern` and `writeConcern` must not be applied to search index management commands.