createIndex( )


Creates an index for a data collection.

The index can't be used immediately, as the process of generating the index takes time. You can check whether your index is ready using listIndexes().

Note that when an index fails to create, the failed index still occupies a slot. To remove the failed index and free up the slot for a new index, use dropIndex().

Authentication

This function requires elevated permissions and runs only on the backend and on dashboard pages.

Permissions
Managa Data Indexes
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
dataCollectionIdstringRequired

ID of the data collection for which to generate the index.


indexIndexRequired

Details of the index to be created.


optionsCreateIndexOptions

Options for creating an index.

Returns
Return Type:Promise<Index>
Was this helpful?
Yes
No