Skip to content

Commit 0ff2dd4

Browse files
authored
Update run-python-tests.yml
1 parent 2b0eaed commit 0ff2dd4

1 file changed

Lines changed: 14 additions & 10 deletions

File tree

.github/workflows/run-python-tests.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,16 @@ jobs:
4040

4141
- name: Setup Database (Data & Indexes)
4242
run: |
43+
# 1. Restore the data
4344
mongorestore --archive=sampledata.archive --port=27017
45+
4446
# ---------------------------------------------------------
45-
# 1. Prepare the Search Index Definition
47+
# 2. Prepare the Search Index Definition
4648
# ---------------------------------------------------------
4749
echo '{
50+
"name": "movieSearchIndex",
51+
"database": "sample_mflix",
52+
"collectionName": "movies",
4853
"mappings": {
4954
"dynamic": false,
5055
"fields": {
@@ -58,16 +63,18 @@ jobs:
5863
}' > search_index.json
5964
6065
# 3. Create the Search Index
61-
atlas deployments search indexes create movieSearchIndex \
66+
atlas deployments search indexes create \
6267
--deploymentName myLocalRs1 \
63-
--db sample_mflix \
64-
--collection movies \
6568
--file search_index.json
6669
6770
# ---------------------------------------------------------
68-
# 2. Prepare the Vector Index Definition
71+
# 4. Prepare the Vector Index Definition
6972
# ---------------------------------------------------------
7073
echo '{
74+
"name": "vector_index",
75+
"database": "sample_mflix",
76+
"collectionName": "embedded_movies",
77+
"type": "vectorSearch",
7178
"fields": [
7279
{
7380
"type": "vector",
@@ -78,12 +85,9 @@ jobs:
7885
]
7986
}' > vector_index.json
8087
81-
# 4. Create the Vector Index
82-
atlas deployments search indexes create vector_index \
88+
# 5. Create the Vector Index
89+
atlas deployments search indexes create \
8390
--deploymentName myLocalRs1 \
84-
--db sample_mflix \
85-
--collection embedded_movies \
86-
--type vectorSearch \
8791
--file vector_index.json
8892
8993
# ---------------------------------------------------------

0 commit comments

Comments
 (0)