Skip to main content

πŸ‘ Create Vector Search Indexes

To start using Vector Search, you must configure another search index on your database. The process is similar to what you did in the last section.

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.

The 'Database Deployments' page with the 'Create Index' link highlighted

Click the Create Search Index button.

The 'Create Index' page with the 'Create Search Index' button highlighted

This time, you will use the JSON Editor to create your index

The 'Create Index' page with the 'JSON Editor' tab highlighted

Select your database and the books collection, change the index name to vectorsearch, and add the following code in the JSON editor:

{
"fields":[
{
"type": "vector",
"path": "embeddings",
"numDimensions": 1408,
"similarity": "cosine"
}
]
}

The final step allows you to review the index configuration and refine it, if needed. Go ahead and click Create Search Index.