Skip to content

Commit e1dbde0

Browse files
committed
feat(mongo-modals): Added new indexes
1 parent f46c55a commit e1dbde0

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

libs/packages/mongo-models/src/movie/movie.schema.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ export const movieSchema = (new Schema(
2121
collection: 'movies'
2222
}
2323
)).index({
24-
title: 'text',
25-
_id: 1
24+
'watched.complete': 1,
25+
'rating.watching': 1
2626
})

libs/packages/mongo-models/src/season/season.schema.ts

+3
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,7 @@ export const seasonSchema = (new Schema(
2424
}
2525
)).index({
2626
showImdbId: 1,
27+
}).index({
28+
showImdbId: 1,
29+
number: 1,
2730
})

libs/packages/mongo-models/src/show/show.schema.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,5 @@ export const showSchema = (new Schema(
2727
collection: 'shows'
2828
}
2929
)).index({
30-
title: 'text',
31-
synopsis: 'text',
32-
_id: 1
30+
'rating.watching': 1
3331
})

0 commit comments

Comments
 (0)