@@ -20,7 +20,7 @@ async function word(movies) {
20
20
// end word text example
21
21
22
22
// print a message if no documents were found
23
- if ( ( await cursor . count ( ) ) === 0 ) {
23
+ if ( ( await movies . countDocuments ( query ) ) === 0 ) {
24
24
console . log ( "No documents found!" ) ;
25
25
}
26
26
await cursor . forEach ( console . dir ) ;
@@ -41,7 +41,7 @@ async function phrase(movies) {
41
41
// end phrase text example
42
42
43
43
// print a message if no documents were found
44
- if ( ( await cursor . count ( ) ) == 0 ) {
44
+ if ( ( await movies . countDocuments ( query ) ) = == 0 ) {
45
45
console . log ( "No documents found!" ) ;
46
46
}
47
47
await cursor . forEach ( console . dir ) ;
@@ -62,7 +62,7 @@ async function negation(movies) {
62
62
// end negation text example
63
63
64
64
// print a message if no documents were found
65
- if ( ( await cursor . count ( ) ) == 0 ) {
65
+ if ( ( await movies . countDocuments ( query ) ) = == 0 ) {
66
66
console . log ( "No documents found!" ) ;
67
67
}
68
68
await cursor . forEach ( console . dir ) ;
@@ -89,7 +89,7 @@ async function relevance(movies) {
89
89
// end relevance text example
90
90
91
91
// print a message if no documents were found
92
- if ( ( await cursor . count ( ) ) === 0 ) {
92
+ if ( ( await movies . countDocuments ( query ) ) === 0 ) {
93
93
console . log ( "No documents found!" ) ;
94
94
}
95
95
await cursor . forEach ( console . dir ) ;
0 commit comments