Bad example in docs
This example uses
await inside of a for loop, which I believe is from convex-demos/vector-search (https://github.com/get-convex/convex-demos/blob/d7e772bf8dcf694a075556c639a0c645b833e4a4/vector-search/convex/movies.ts#L110), and this is, in general a bad practice, and it becomes evident when there's a large number of ids to enumerate, resulting in very long response times. A better solution would be to use Promise.all and Array.prototype.filter as follows: