create-index
Create an index on a MongoDB collection to improve query performance, supporting standard, vector, and Atlas Search indexes.
Instructions
Create an index for a collection
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | The name of the index | |
| database | Yes | Database name | |
| collection | Yes | Collection name | |
| definition | Yes | The index definition. Use 'classic' for standard indexes, 'vectorSearch' for vector search indexes, and 'search' for Atlas Search (lexical) indexes. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database | Yes | ||
| indexName | Yes | ||
| indexType | Yes | ||
| collection | Yes |