You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Search movies using MongoDB Search across multiple fields.
125
-
* Demonstrates MongoDB Atlas Search with compound queries and fuzzy matching.
122
+
* @swagger
123
+
* /api/movies/search:
124
+
* get:
125
+
* summary: Search movies using MongoDB Atlas Search
126
+
* description: Search movies using MongoDB Atlas Search across multiple fields with compound queries and fuzzy matching. Demonstrates MongoDB Atlas Search capabilities.
127
+
* tags: [Movies]
128
+
* parameters:
129
+
* - in: query
130
+
* name: plot
131
+
* schema:
132
+
* type: string
133
+
* description: Search in plot field using phrase matching
134
+
* example: detective solving mystery
135
+
* - in: query
136
+
* name: fullplot
137
+
* schema:
138
+
* type: string
139
+
* description: Search in fullplot field using phrase matching
140
+
* example: crime investigation
141
+
* - in: query
142
+
* name: directors
143
+
* schema:
144
+
* type: string
145
+
* description: Search for directors with fuzzy matching
146
+
* example: Christopher Nolan
147
+
* - in: query
148
+
* name: writers
149
+
* schema:
150
+
* type: string
151
+
* description: Search for writers with fuzzy matching
152
+
* example: Quentin Tarantino
153
+
* - in: query
154
+
* name: cast
155
+
* schema:
156
+
* type: string
157
+
* description: Search for cast members with fuzzy matching
158
+
* example: Tom Hanks
159
+
* - in: query
160
+
* name: searchOperator
161
+
* schema:
162
+
* type: string
163
+
* enum: [must, should, mustNot, filter]
164
+
* default: must
165
+
* description: Search operator for compound queries
166
+
* - in: query
167
+
* name: limit
168
+
* schema:
169
+
* type: integer
170
+
* default: 20
171
+
* maximum: 100
172
+
* description: Number of results to return
173
+
* - in: query
174
+
* name: skip
175
+
* schema:
176
+
* type: integer
177
+
* default: 0
178
+
* description: Number of documents to skip for pagination
179
+
* responses:
180
+
* 200:
181
+
* description: Search results
182
+
* content:
183
+
* application/json:
184
+
* schema:
185
+
* allOf:
186
+
* - $ref: '#/components/schemas/SuccessResponse'
187
+
* - type: object
188
+
* properties:
189
+
* data:
190
+
* type: object
191
+
* properties:
192
+
* movies:
193
+
* type: array
194
+
* items:
195
+
* $ref: '#/components/schemas/Movie'
196
+
* count:
197
+
* type: integer
198
+
* limit:
199
+
* type: integer
200
+
* skip:
201
+
* type: integer
202
+
* 400:
203
+
* description: Bad request - invalid search operator or no search parameters provided
* Search movies using MongoDB Vector Search for semantic similarity.
133
-
* Demonstrates vector search using embeddings to find similar plots.
212
+
* @swagger
213
+
* /api/movies/vector-search:
214
+
* get:
215
+
* summary: Search movies using MongoDB Vector Search
216
+
* description: Search movies using MongoDB Vector Search for semantic similarity. Demonstrates vector search using embeddings to find movies with similar plots. Requires VOYAGE_API_KEY to be configured.
217
+
* tags: [Movies]
218
+
* parameters:
219
+
* - in: query
220
+
* name: q
221
+
* required: true
222
+
* schema:
223
+
* type: string
224
+
* description: Search query for semantic similarity
225
+
* example: space exploration and alien encounters
226
+
* - in: query
227
+
* name: limit
228
+
* schema:
229
+
* type: integer
230
+
* default: 10
231
+
* maximum: 50
232
+
* description: Number of results to return
233
+
* responses:
234
+
* 200:
235
+
* description: Vector search results with similarity scores
236
+
* content:
237
+
* application/json:
238
+
* schema:
239
+
* allOf:
240
+
* - $ref: '#/components/schemas/SuccessResponse'
241
+
* - type: object
242
+
* properties:
243
+
* data:
244
+
* type: array
245
+
* items:
246
+
* allOf:
247
+
* - $ref: '#/components/schemas/Movie'
248
+
* - type: object
249
+
* properties:
250
+
* score:
251
+
* type: number
252
+
* description: Vector similarity score
253
+
* 400:
254
+
* description: Bad request - missing query parameter or VOYAGE_API_KEY not configured
* GET /api/movies/aggregations/reportingByComments
139
-
*
140
-
* Aggregate movies with their most recent comments.
141
-
* Demonstrates MongoDB $lookup aggregation to join collections.
263
+
* @swagger
264
+
* /api/movies/aggregations/reportingByComments:
265
+
* get:
266
+
* summary: Get movies with their most recent comments
267
+
* description: Aggregate movies with their most recent comments using MongoDB $lookup aggregation. Demonstrates joining collections and sorting by nested fields.
268
+
* tags: [Movies]
269
+
* parameters:
270
+
* - in: query
271
+
* name: limit
272
+
* schema:
273
+
* type: integer
274
+
* default: 10
275
+
* maximum: 50
276
+
* description: Number of recent comments to include per movie
277
+
* - in: query
278
+
* name: movieId
279
+
* schema:
280
+
* type: string
281
+
* description: Optional MongoDB ObjectId to filter for a specific movie
282
+
* example: 573a1390f29313caabcd4135
283
+
* responses:
284
+
* 200:
285
+
* description: Movies with their most recent comments
* Demonstrates MongoDB $group aggregation for statistical calculations.
336
+
* @swagger
337
+
* /api/movies/aggregations/reportingByYear:
338
+
* get:
339
+
* summary: Get movie statistics by year
340
+
* description: Aggregate movies by year with statistics including count, average rating, highest/lowest ratings, and total votes. Demonstrates MongoDB $group aggregation for statistical calculations.
* GET /api/movies/aggregations/reportingByDirectors
155
-
*
156
-
* Aggregate directors with the most movies.
157
-
* Demonstrates MongoDB $unwind and $group for array aggregation.
379
+
* @swagger
380
+
* /api/movies/aggregations/reportingByDirectors:
381
+
* get:
382
+
* summary: Get directors with the most movies
383
+
* description: Aggregate directors with the most movies, including their movie count and average rating. Demonstrates MongoDB $unwind and $group for array aggregation.
0 commit comments