- Create
VectorTest
database. - Create
test
collection. - Create vector index:
db.test.createSearchIndex(
"vectorIndex",
"vectorSearch",
{
"fields": [
{
"type": "vector",
"path": "embedding",
"numDimensions": 1536,
"similarity": "cosine"
}
]
}
);
- Run
ingest.py
. - Run
search.py
.