Skip to content

Commit 7d9d2a8

Browse files
author
lukovicaleksa
committed
CHANGE: Update README.md
1 parent 50deda3 commit 7d9d2a8

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

README.md

+25-4
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,47 @@ This project works with the data from [TMDB 5000 Movie Dataset from Kaggle](http
2323
The steps to get the project up and running are:
2424

2525
1. Clone the repository to your local machine
26-
2. MongoDB Atlas setup
26+
2. MongoDB Atlas Cluster setup
2727
1. Create account on MongoDB Atlas (if you don't already have one) and log in
2828
2. Create a new project and deploy a free cluster
2929
3. Add database user and save credentials (username and password)
3030
4. Get connection string, should look like this: `mongodb+srv://<username>:<password>@<host>/?retryWrites=true&w=majority`, part after host is optional
31-
3. Create a .env file in project root and fill in with your user credentials and host from the MongoDB connection string, vector search index name can be chosen arbitrarily
31+
3. MongoDB Atlas Vector Search setup
32+
1. Find deployed cluster in the Database section and create a database called 'semantic_search' with 'movies' collection in it
33+
2. Create a vector search index with name 'moviesVectorSearch' and link it to created collection. For Index definition use the following JSON Editor:
34+
```json
35+
{
36+
"mappings": {
37+
"dynamic": true,
38+
"fields": {
39+
"embedding": {
40+
"dimensions": 384,
41+
"similarity": "cosine",
42+
"type": "knnVector"
43+
}
44+
}
45+
}
46+
}
47+
```
48+
4. Create a .env file in project root and fill in with your user credentials and host from the MongoDB connection string. Fill in the DB name, movies collection name and search index name as you named them in MongoDB Atlas
3249
``` dotenv
3350
# MongoDB Atlas Credentials
3451
MONGODB_ATLAS_USERNAME=<username>
3552
MONGODB_ATLAS_PASSWORD=<password>
3653
MONGODB_ATLAS_HOST=<host>
3754
55+
# MongoDB Atlas Database
56+
MONGODB_ATLAS_DB_NAME=semantic_search
57+
MONGODB_ATLAS_MOVIES_COLLECTION_NAME=movies
58+
3859
# MongoDB Atlas Vector Search
3960
MONGODB_ATLAS_MOVIES_VECTOR_SEARCH_INDEX_NAME=moviesVectorSearch
4061
```
41-
4. Create Python virtual environment with version 3.11 (should work with older versions like 3.10 and 3.9)
62+
5. Create Python virtual environment with version 3.11 (should work with older versions like 3.10 and 3.9)
4263
``` commandline
4364
conda create --name your_environment_name python=3.11
4465
```
45-
5. Activate the environment and install the packages
66+
6. Activate the environment and install the packages
4667
``` commandline
4768
conda activate your_environment_name
4869
pip install -r requirements.txt

0 commit comments

Comments
 (0)