missing Collection `createIndex`?
Is there any possibility top add the createIndex command for collection?
@GCSBOSS Hey, thanks for reaching out
Do have any idea of how we can implement it? is there any api?
I haven't tested it myself, but you should be able to add support for the createIndexes operation in the Collection class by implementing it as follows:
async createIndexes(indexes: Document[]): Promise<Document[]> {
return this.callApi("createIndexes", { indexes });
}
@juratori Can you send me the docs for createIndexes api route? I can't find anything related here https://www.mongodb.com/docs/atlas/api/data-api-resources/
It may works, but it's not documented anywhere
@erfanium you are right! createIndexes doesn't seem to be a built-in route within the 'Atlas Data API'. Instead, I found that it is documented in the 'MongoDB Manual' and is considered a part of the 'MongoDB Atlas Administration API'
It appeared to me that the createIndexes operation is available for use, but it may not be as straightforward as I initially assumed. Implementing it could involve additional steps, such as dropping and listing indexes, and so on.