๐ Create Vector Search indexes
To start using Vector Search, you must configure another search index on your database.
Step-by-step guide to creating your Vector Search indexโ
Open the Database Deployments page in MongoDB Atlas and select Create Index in the lower right corner.
Click the Create Search Index button.
This time, you will use the JSON Editor to create your index
Select your database and collection, leave the index name set to vector_index
, and add the following code in the JSON editor:
{
"fields": [{
"type": "vector",
"path": "embedding",
"numDimensions": 1536,
"similarity": "cosine"
}]
}
The final step allows you to review the index configuration and refine it if needed. Go ahead and click Create Search Index.