To fix the following error while looking institutions with a lot of repositories (ie. EPFL and CampToCamp):
MongoServerError:
PlanExecutor error during aggregation :: caused by ::
Sort exceeded memory limit of 33554432 bytes,
but did not opt in to external sorting.
at Connection.onMessage (/dist/node_modules/mongodb/lib/cmap/connection.js:210:30)
at MessageStream.<anonymous> (/dist/node_modules/mongodb/lib/cmap/connection.js:63:60)
at MessageStream.emit (node:events:514:28)
at processIncomingData (/dist/node_modules/mongodb/lib/cmap/message_stream.js:132:20)
at MessageStream._write (/dist/node_modules/mongodb/lib/cmap/message_stream.js:33:9)
at writeOrBuffer (node:internal/streams/writable:399:12)
at _write (node:internal/streams/writable:340:10)
at Writable.write (node:internal/streams/writable:344:10)
at TLSSocket.ondata (node:internal/streams/readable:785:22)
at TLSSocket.emit (node:events:514:28)
added an option to use external sorting (use swap disk instead of RAM) for the function findInstitutionWithShortName within the MongoDB service.
also fixed a few typos with the word institution that made the code inconsistent.
To fix the following error while looking institutions with a lot of repositories (ie. EPFL and CampToCamp):
findInstitutionWithShortName
within the MongoDB service.institution
that made the code inconsistent.