なぜ $in は $all よりもはるかに高速なのですか?前に同様の質問をしました。答えは、並べ替えなどのために $in (より多くの行をスキャンし、より多くの結果を返す) の方が高速であるという考えです。
私はそれが問題だとは思わないので、$all を 1 つの項目だけでテストします。
アイテムが 1 つだけの $all は、通常の検索権と同等ですか?
$all なしのログは次のとおりです (30 スレッドで 4700 個のテスト ケースを使用しました)。
今の問題は、$all が $in よりも遅いということではありません。$all は、ANYTHING より単純に遅いです。基本検索を含む。
Thu Sep 20 17:27:05 [conn11] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^emic/ } ntoreturn:20 reslen:20 404ms
Thu Sep 20 17:27:05 [conn21] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^jakarta/ } ntoreturn:20 nreturned:20 reslen:1193 67ms
Thu Sep 20 17:27:05 [conn15] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^sap/ } ntoreturn:20 nscanned:20 nreturned:20 reslen:1138 219ms
Thu Sep 20 17:27:05 [conn5] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^ione/ } ntoreturn:20 reslen:20 326ms
Thu Sep 20 17:27:05 [conn20] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^phi/ } ntoreturn:20 nscanned:20 nreturned:20 reslen:1210 340ms
Thu Sep 20 17:27:05 [conn13] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^dentist/ } ntoreturn:20 nscanned:20 nreturned:20 reslen:1074 252ms
Thu Sep 20 17:27:05 [conn23] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^othe/ } ntoreturn:20 nscanned:20 nreturned:20 reslen:1048 113ms
Thu Sep 20 17:27:05 [conn9] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^kota/ } ntoreturn:20 nscanned:20 nreturned:20 reslen:1147 296ms
Thu Sep 20 17:27:05 [conn7] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^budi/ } ntoreturn:20 nscanned:20 nreturned:20 reslen:1068 250ms
Thu Sep 20 17:27:05 [conn16] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^atc/ } ntoreturn:20 reslen:20 364ms
Thu Sep 20 17:27:06 [conn21] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^mir/ } ntoreturn:20 nscanned:20 nreturned:20 reslen:1055 275ms
Thu Sep 20 17:27:06 [conn11] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^mogo/ } ntoreturn:20 nscanned:6 nreturned:6 reslen:347 325ms
Thu Sep 20 17:27:06 [conn5] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^pondok/ } ntoreturn:20 nscanned:20 nreturned:20 reslen:993 184ms
Thu Sep 20 17:27:06 [conn15] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^aneka/ } ntoreturn:20 nscanned:20 nreturned:20 reslen:1114 257ms
Thu Sep 20 17:27:06 [conn20] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^tv/ } ntoreturn:20 nscanned:20 nreturned:20 reslen:1154 173ms
Thu Sep 20 17:27:06 [conn7] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^t/ } ntoreturn:20 nreturned:20 reslen:1085 3ms
Thu Sep 20 17:27:06 [conn9] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^system/ } ntoreturn:20 nscanned:20 nreturned:20 reslen:1271 177ms
Thu Sep 20 17:27:06 [conn13] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^crepes/ } ntoreturn:20 nscanned:20 nreturned:20 reslen:1134 302ms
Thu Sep 20 17:27:06 [conn23] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^factor/ } ntoreturn:20 nscanned:20 nreturned:20 reslen:1324 340ms
Thu Sep 20 17:27:06 [conn16] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^baso/ } ntoreturn:20 nscanned:20 nreturned:20 reslen:1214 239ms
Thu Sep 20 17:27:06 [conn15] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^forward/ } ntoreturn:20 nreturned:20 reslen:1351 52ms
Thu Sep 20 17:27:06 [conn21] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^permai/ } ntoreturn:20 nscanned:20 nreturned:20 reslen:1268 318ms
Thu Sep 20 17:27:06 [conn11] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^eam/ } ntoreturn:20 reslen:20 311ms
Thu Sep 20 17:27:06 [conn5] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^elf/ } ntoreturn:20 nscanned:1 nreturned:1 reslen:80 319ms
Thu Sep 20 17:27:06 [conn20] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^anugrah/ } ntoreturn:20 nscanned:20 nreturned:20 reslen:1191 279ms
Thu Sep 20 17:27:07 [conn9] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^mac/ } ntoreturn:20 nscanned:20 nreturned:20 reslen:1234 282ms
Thu Sep 20 17:27:07 [conn13] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^happy/ } ntoreturn:20 nscanned:20 nreturned:20 reslen:1153 298ms
Thu Sep 20 17:27:07 [conn7] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^warding/ } ntoreturn:20 reslen:20 408ms
Thu Sep 20 17:27:07 [conn21] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^g/ } ntoreturn:20 nreturned:20 reslen:1220 3ms
Thu Sep 20 17:27:07 [conn23] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^otak/ } ntoreturn:20 nscanned:3 nreturned:3 reslen:204 336ms
Thu Sep 20 17:27:07 [conn16] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^nail/ } ntoreturn:20 nscanned:20 nreturned:20 reslen:1226 312ms
Thu Sep 20 17:27:07 [conn15] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^apotik/ } ntoreturn:20 nscanned:20 nreturned:20 reslen:977 195ms
Thu Sep 20 17:27:07 [conn11] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^kare/ } ntoreturn:20 nscanned:20 nreturned:20 reslen:1116 295ms
Thu Sep 20 17:27:07 [conn5] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^king/ } ntoreturn:20 nscanned:20 nreturned:20 reslen:1131 252ms
Thu Sep 20 17:27:07 [conn9] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^modern/ } ntoreturn:20 nscanned:20 nreturned:20 reslen:1069 252ms
Thu Sep 20 17:27:07 [conn20] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^dutamas/ } ntoreturn:20 nscanned:6 nreturned:6 reslen:396 326ms
Thu Sep 20 17:27:07 [conn21] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^course/ } ntoreturn:20 nscanned:20 nreturned:20 reslen:1185 237ms
Thu Sep 20 17:27:07 [conn7] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: /^elle/ } ntoreturn:20 nscanned:3 nreturned:3 reslen:180 349ms
Thu Sep 20 17:27:07 [conn13] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.000785114234121064
$all を使用した場合の結果は次のとおりです
hu Sep 20 16:51:32 [conn11] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^ykai/ ] } } ntoreturn:20 reslen:20 1712ms
Thu Sep 20 16:51:33 [conn21] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^mnctv/ ] } } ntoreturn:20 reslen:20 1543ms
Thu Sep 20 16:51:33 [conn5] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^edric/ ] } } ntoreturn:20 reslen:20 1378ms
Thu Sep 20 16:51:33 [conn16] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^emobile/ ] } } ntoreturn:20 nscanned:1 nreturned:1 reslen:68 1435ms
Thu Sep 20 16:51:33 [conn15] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^foodfes/ ] } } ntoreturn:20 nscanned:1 nreturned:1 reslen:73 1657ms
Thu Sep 20 16:51:33 [conn20] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^consys/ ] } } ntoreturn:20 reslen:20 1698ms
Thu Sep 20 16:51:33 [conn7] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^nokiaw/ ] } } ntoreturn:20 reslen:20 1747ms
Thu Sep 20 16:51:33 [conn13] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^elf/ ] } } ntoreturn:20 nscanned:1 nreturned:1 reslen:80 1572ms
Thu Sep 20 16:51:33 [conn9] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^rmhku/ ] } } ntoreturn:20 reslen:20 1553ms
Thu Sep 20 16:51:34 [conn11] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^refly/ ] } } ntoreturn:20 reslen:20 1768ms
Thu Sep 20 16:51:34 [conn23] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^yuanita/ ] } } ntoreturn:20 reslen:20 1913ms
Thu Sep 20 16:51:34 [conn5] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^mediate/ ] } } ntoreturn:20 nscanned:2 nreturned:2 reslen:103 1543ms
Thu Sep 20 16:51:34 [conn15] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^diskus/ ] } } ntoreturn:20 nscanned:1 nreturned:1 reslen:70 1411ms
Thu Sep 20 16:51:34 [conn21] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^rico/ ] } } ntoreturn:20 nscanned:8 nreturned:8 reslen:486 1748ms
Thu Sep 20 16:51:34 [conn16] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^bismart/ ] } } ntoreturn:20 reslen:20 1643ms
Thu Sep 20 16:51:35 [conn13] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^livera/ ] } } ntoreturn:20 reslen:20 1502ms
Thu Sep 20 16:51:35 [conn20] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^kikirna/ ] } } ntoreturn:20 reslen:20 1693ms
Thu Sep 20 16:51:35 [conn11] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^factor/ ] } } ntoreturn:20 nscanned:20 nreturned:20 reslen:1324 1161ms
Thu Sep 20 16:51:35 [conn9] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^haytien/ ] } } ntoreturn:20 reslen:20 1679ms
Thu Sep 20 16:51:35 [conn7] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^harni/ ] } } ntoreturn:20 nscanned:1 nreturned:1 reslen:86 1994ms
Thu Sep 20 16:51:36 [conn23] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^otak/ ] } } ntoreturn:20 nscanned:3 nreturned:3 reslen:204 1912ms
Thu Sep 20 16:51:36 [conn5] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^bluenet/ ] } } ntoreturn:20 reslen:20 1598ms
Thu Sep 20 16:51:36 [conn21] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^topwan/ ] } } ntoreturn:20 reslen:20 1549ms
Thu Sep 20 16:51:36 [conn15] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^tobas/ ] } } ntoreturn:20 nscanned:1 nreturned:1 reslen:54 1596ms
Thu Sep 20 16:51:36 [conn16] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^imagen/ ] } } ntoreturn:20 nscanned:1 nreturned:1 reslen:55 1595ms
Thu Sep 20 16:51:36 [conn9] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^corocot/ ] } } ntoreturn:20 nscanned:2 nreturned:2 reslen:128 1280ms
Thu Sep 20 16:51:36 [conn13] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^pdor/ ] } } ntoreturn:20 reslen:20 1682ms
Thu Sep 20 16:51:36 [conn20] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^elcom/ ] } } ntoreturn:20 nscanned:1 nreturned:1 reslen:63 1865ms
Thu Sep 20 16:51:37 [conn11] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^delapan/ ] } } ntoreturn:20 nscanned:6 nreturned:6 reslen:358 1740ms
Thu Sep 20 16:51:37 [conn7] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^tato/ ] } } ntoreturn:20 nscanned:13 nreturned:13 reslen:863 1678ms
Thu Sep 20 16:51:37 [conn23] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^mac/ ] } } ntoreturn:20 nscanned:20 nreturned:20 reslen:1234 1197ms
Thu Sep 20 16:51:37 [conn5] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^dutamas/ ] } } ntoreturn:20 nscanned:6 nreturned:6 reslen:396 1455ms
Thu Sep 20 16:51:37 [conn16] query newisikotagte15.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.8317, -6.2426 ], $maxDistance: 0.0007851142341210646 }, indexWords: { $all: [ /^jeneiro/ ] } } ntoreturn:20 reslen:20 1466ms
注: $all を 1 つの単語だけに使用するのは役に立たないことは承知しており、それがポイントです。
問題がインデックス作成やクエリ自体にあるのではないことを示すために、1 つの単語を使用します。
将来的には、明らかに $all を 2 ~ 3 個のキーワードに使用します。ただし、このサンプルでは、結果が異なるという事実に問題があるのではなく、より根本的な何かに問題があることを明確にするために、1 つの単語のみを使用しています。
$in はまったく問題ありません。ここに問題があるようです: https://jira.mongodb.org/browse/SERVER-1745しかし、私はそれを理解していません。server-1745 とは何ですか?